velofy/migrations/script.py.mako

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
582 B
Text
Raw Normal View History

"""${message}."""
import os
import sqlalchemy as sa
from alembic import op
${imports if imports else ""}
from velofy import configuration
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
config = configuration.make_config("testing" if os.getenv("TESTING") else "production")
def upgrade():
"""Upgrade to the next revision."""
${upgrades if upgrades else "pass"}
def downgrade():
"""Downgrade to the previous revision."""
${downgrades if downgrades else "pass"}