Skip to content

Commit 853038d

Browse files
committed
Added lost default param in elections table migration
1 parent 40041ad commit 853038d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/alembic/versions/243190df5588_create_election_tables.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@
2020

2121

2222
def upgrade() -> None:
23-
# ### commands auto generated by Alembic - please adjust! ###
2423
op.create_table("election",
2524
sa.Column("slug", sa.String(length=32), nullable=False),
2625
sa.Column("name", sa.String(length=32), nullable=False),
2726
sa.Column("officer_id", sa.String(length=32), nullable=False),
28-
sa.Column("type", sa.String(length=64), nullable=True),
27+
sa.Column("type", sa.String(length=64), nullable=True, default="general_election"),
2928
sa.Column("date", sa.DateTime(), nullable=False),
3029
sa.Column("end_date", sa.DateTime(), nullable=True),
3130
sa.Column("survey_link", sa.String(length=300), nullable=True),
@@ -51,12 +50,9 @@ def upgrade() -> None:
5150
sa.ForeignKeyConstraint(["nominee_election"], ["election.slug"], ),
5251
sa.PrimaryKeyConstraint("computing_id", "nominee_election")
5352
)
54-
# ### end Alembic commands ###
5553

5654

5755
def downgrade() -> None:
58-
# ### commands auto generated by Alembic - please adjust! ###
5956
op.drop_table("nominee_application")
6057
op.drop_table("election_nominee")
6158
op.drop_table("election")
62-
# ### end Alembic commands ###

0 commit comments

Comments
 (0)