2026-12-01 22:11:19 +01:00
|
|
|
"""${message}."""
|
2020-08-09 17:14:23 +02:00
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
from alembic import op
|
|
|
|
|
${imports if imports else ""}
|
|
|
|
|
|
2026-11-23 18:06:53 +01:00
|
|
|
from velofy import configuration
|
2020-08-09 17:14:23 +02:00
|
|
|
|
2026-12-01 22:11:19 +01:00
|
|
|
|
2020-08-09 17:14:23 +02:00
|
|
|
revision = ${repr(up_revision)}
|
|
|
|
|
down_revision = ${repr(down_revision)}
|
|
|
|
|
branch_labels = ${repr(branch_labels)}
|
|
|
|
|
depends_on = ${repr(depends_on)}
|
|
|
|
|
|
|
|
|
|
|
2026-12-01 22:11:19 +01:00
|
|
|
config = configuration.make_config("testing" if os.getenv("TESTING") else "production")
|
2020-08-09 17:14:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
2026-12-01 22:11:19 +01:00
|
|
|
"""Upgrade to the next revision."""
|
2020-08-09 17:14:23 +02:00
|
|
|
${upgrades if upgrades else "pass"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
2026-12-01 22:11:19 +01:00
|
|
|
"""Downgrade to the previous revision."""
|
2020-08-09 17:14:23 +02:00
|
|
|
${downgrades if downgrades else "pass"}
|