|
5 | 5 | Create Date: 2025-09-28 18:03:54.856781 |
6 | 6 |
|
7 | 7 | """ |
8 | | -from typing import Sequence, Union |
| 8 | +from collections.abc import Sequence |
9 | 9 |
|
10 | | -from alembic import op |
11 | 10 | import sqlalchemy as sa |
12 | 11 |
|
| 12 | +from alembic import op |
13 | 13 |
|
14 | 14 | # revision identifiers, used by Alembic. |
15 | | -revision: str = 'a5c42bcdda5c' |
16 | | -down_revision: Union[str, None] = '876041e5b41c' |
17 | | -branch_labels: Union[str, Sequence[str], None] = None |
18 | | -depends_on: Union[str, Sequence[str], None] = None |
| 15 | +revision: str = "a5c42bcdda5c" |
| 16 | +down_revision: str | None = "876041e5b41c" |
| 17 | +branch_labels: str | Sequence[str] | None = None |
| 18 | +depends_on: str | Sequence[str] | None = None |
19 | 19 |
|
20 | 20 |
|
21 | 21 | def upgrade() -> None: |
22 | 22 | # ### commands auto generated by Alembic - please adjust! ### |
23 | | - op.alter_column('election', 'type', |
| 23 | + op.alter_column("election", "type", |
24 | 24 | existing_type=sa.VARCHAR(length=64), |
25 | 25 | type_=sa.String(length=32), |
26 | 26 | nullable=False) |
27 | | - op.create_unique_constraint(op.f('uq_officer_term_computing_id'), 'officer_term', ['computing_id', 'position', 'start_date']) |
| 27 | + op.create_unique_constraint(op.f("uq_officer_term_computing_id"), "officer_term", ["computing_id", "position", "start_date"]) |
28 | 28 | # ### end Alembic commands ### |
29 | 29 |
|
30 | 30 |
|
31 | 31 | def downgrade() -> None: |
32 | 32 | # ### commands auto generated by Alembic - please adjust! ### |
33 | | - op.drop_constraint(op.f('uq_officer_term_computing_id'), 'officer_term', type_='unique') |
34 | | - op.alter_column('election', 'type', |
| 33 | + op.drop_constraint(op.f("uq_officer_term_computing_id"), "officer_term", type_="unique") |
| 34 | + op.alter_column("election", "type", |
35 | 35 | existing_type=sa.String(length=32), |
36 | 36 | type_=sa.VARCHAR(length=64), |
37 | 37 | nullable=True) |
|
0 commit comments