squeaknode/alembic/script.py.mako
Jonathan Zernik 24abdd0ee3
Add alembic (#418)
* Add alembic with init command

* Create separate models class

* Add target metadata to alembic config

* Got initial migration working

* Move migration code into separate module

* Add documentation for migrations
2020-11-08 21:23:19 -05:00

24 lines
494 B
Mako

"""${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade():
${upgrades if upgrades else "pass"}
def downgrade():
${downgrades if downgrades else "pass"}