Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

script.py.mako 635 B

1234567891011121314151617181920212223242526
  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"}