2020
2121
2222def 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
5755def 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