diff options
Diffstat (limited to 'db/migrations/versions/202607021803-ac4fbf1fea31_added_password.py')
| -rw-r--r-- | db/migrations/versions/202607021803-ac4fbf1fea31_added_password.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/db/migrations/versions/202607021803-ac4fbf1fea31_added_password.py b/db/migrations/versions/202607021803-ac4fbf1fea31_added_password.py index 116d27e..5ad10c9 100644 --- a/db/migrations/versions/202607021803-ac4fbf1fea31_added_password.py +++ b/db/migrations/versions/202607021803-ac4fbf1fea31_added_password.py | |||
| @@ -5,29 +5,32 @@ Revises: fc6608d3f9cc | |||
| 5 | Create Date: 2026-07-02 18:03:17.190700 | 5 | Create Date: 2026-07-02 18:03:17.190700 |
| 6 | 6 | ||
| 7 | """ | 7 | """ |
| 8 | from typing import Sequence, Union | ||
| 9 | 8 | ||
| 10 | from alembic import op | 9 | from collections.abc import Sequence |
| 10 | |||
| 11 | import sqlalchemy as sa | 11 | import sqlalchemy as sa |
| 12 | import sqlmodel | 12 | import sqlmodel |
| 13 | 13 | from alembic import op | |
| 14 | 14 | ||
| 15 | # revision identifiers, used by Alembic. | 15 | # revision identifiers, used by Alembic. |
| 16 | revision: str = 'ac4fbf1fea31' | 16 | revision: str = "ac4fbf1fea31" |
| 17 | down_revision: Union[str, Sequence[str], None] = 'fc6608d3f9cc' | 17 | down_revision: str | Sequence[str] | None = "fc6608d3f9cc" |
| 18 | branch_labels: Union[str, Sequence[str], None] = None | 18 | branch_labels: str | Sequence[str] | None = None |
| 19 | depends_on: Union[str, Sequence[str], None] = None | 19 | depends_on: str | Sequence[str] | None = None |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | def upgrade() -> None: | 22 | def upgrade() -> None: |
| 23 | """Upgrade schema.""" | 23 | """Upgrade schema.""" |
| 24 | # ### commands auto generated by Alembic - please adjust! ### | 24 | # ### commands auto generated by Alembic - please adjust! ### |
| 25 | op.add_column('user', sa.Column('password', sqlmodel.sql.sqltypes.AutoString(), nullable=False)) | 25 | op.add_column( |
| 26 | "user", | ||
| 27 | sa.Column("password", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
| 28 | ) | ||
| 26 | # ### end Alembic commands ### | 29 | # ### end Alembic commands ### |
| 27 | 30 | ||
| 28 | 31 | ||
| 29 | def downgrade() -> None: | 32 | def downgrade() -> None: |
| 30 | """Downgrade schema.""" | 33 | """Downgrade schema.""" |
| 31 | # ### commands auto generated by Alembic - please adjust! ### | 34 | # ### commands auto generated by Alembic - please adjust! ### |
| 32 | op.drop_column('user', 'password') | 35 | op.drop_column("user", "password") |
| 33 | # ### end Alembic commands ### | 36 | # ### end Alembic commands ### |
