diff --git a/migrations/script.py.mako b/migrations/script.py.mako index 641c372bc..d2b0180f8 100644 --- a/migrations/script.py.mako +++ b/migrations/script.py.mako @@ -1,23 +1,22 @@ """${message} -Revision ID: ${up_revision} -Revises: ${down_revision | comma,n} Create Date: ${create_date} - """ -from typing import Sequence, Union +from collections.abc import Sequence -from alembic import op import sqlalchemy as sa +from alembic import op + ## We need to import app for migrations involving app.utils.types.datetime.TZDateTime() import app + ${imports if imports else ""} # revision identifiers, used by Alembic. revision: str = ${repr(up_revision)} -down_revision: Union[str, None] = ${repr(down_revision)} -branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)} -depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)} +down_revision: str | None = ${repr(down_revision)} +branch_labels: str | Sequence[str] | None = ${repr(branch_labels)} +depends_on: str | Sequence[str] | None = ${repr(depends_on)} def upgrade() -> None: