Simplify the docstrings of the migrations

The "Revision" and "Revises" lines and the revision hashes in `upgrade()`
and `downgrade()` repeated the `revision` and `down_revision` variables;
the creation date is in the file name.
This commit is contained in:
Alexander Hess 2026-12-01 22:11:19 +01:00
commit db2e00216d
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -1,8 +1,4 @@
"""${message}.
Revision: # ${up_revision} at ${create_date}
Revises: # ${down_revision | comma,n}
"""
"""${message}."""
import os
@ -12,20 +8,21 @@ ${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')
config = configuration.make_config("testing" if os.getenv("TESTING") else "production")
def upgrade():
"""Upgrade to revision ${up_revision}."""
"""Upgrade to the next revision."""
${upgrades if upgrades else "pass"}
def downgrade():
"""Downgrade to revision ${down_revision}."""
"""Downgrade to the previous revision."""
${downgrades if downgrades else "pass"}