You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
635 B

  1. """${message}
  2. Revision ID: ${up_revision}
  3. Revises: ${down_revision | comma,n}
  4. Create Date: ${create_date}
  5. """
  6. from typing import Sequence, Union
  7. from alembic import op
  8. import sqlalchemy as sa
  9. ${imports if imports else ""}
  10. # revision identifiers, used by Alembic.
  11. revision: str = ${repr(up_revision)}
  12. down_revision: Union[str, None] = ${repr(down_revision)}
  13. branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
  14. depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
  15. def upgrade() -> None:
  16. ${upgrades if upgrades else "pass"}
  17. def downgrade() -> None:
  18. ${downgrades if downgrades else "pass"}