File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def upgrade():
4040
4141 # Fill in default for any users without a profile row (should not exist, but be safe)
4242 op .execute (
43- 'UPDATE "user" SET receive_notifications = TRUE WHERE receive_notifications IS NULL;'
43+ 'UPDATE "user" SET receive_notifications = FALSE WHERE receive_notifications IS NULL;'
4444 )
4545
4646 op .alter_column ("user" , "receive_notifications" , nullable = False )
@@ -53,7 +53,7 @@ def downgrade():
5353 op .create_table (
5454 "user_profile" ,
5555 sa .Column ("user_id" , sa .Integer (), nullable = False ),
56- sa .Column ("receive_notifications" , sa .Boolean (), nullable = False ),
56+ sa .Column ("receive_notifications" , sa .Boolean (), nullable = True ),
5757 sa .Column ("first_name" , sa .String (256 ), nullable = True ),
5858 sa .Column ("last_name" , sa .String (256 ), nullable = True ),
5959 sa .ForeignKeyConstraint (["user_id" ], ["user.id" ], ondelete = "CASCADE" ),
You can’t perform that action at this time.
0 commit comments