Skip to content

Commit d9809a5

Browse files
committed
Fix migration
1 parent 52ad8ef commit d9809a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/migrations/community/e3f1a9b2c4d6_merge_user_profile_into_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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"),

0 commit comments

Comments
 (0)