aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2023-09-04 21:44:17 +0100
committerGravatar Joe Banks <[email protected]>2023-09-04 21:44:46 +0100
commitb88a255fc86490ca798a96cfca05e8c0c0affc6d (patch)
treebc84b6ffce2ab1c62700b99e4d9b257424e2a5bf
parentAlso tag GHCR images with major version number (#75) (diff)
Set nulled pending users to false in the new null constraints migration
-rw-r--r--alembic/versions/03655ce2097b_new_not_null_constraints_on_messages_.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/alembic/versions/03655ce2097b_new_not_null_constraints_on_messages_.py b/alembic/versions/03655ce2097b_new_not_null_constraints_on_messages_.py
index 8ad0473..a5f0461 100644
--- a/alembic/versions/03655ce2097b_new_not_null_constraints_on_messages_.py
+++ b/alembic/versions/03655ce2097b_new_not_null_constraints_on_messages_.py
@@ -35,6 +35,8 @@ def upgrade() -> None:
op.alter_column("users", "in_guild",
existing_type=sa.BOOLEAN(),
nullable=False)
+
+ op.execute("UPDATE users SET pending = FALSE WHERE pending IS NULL")
op.alter_column("users", "pending",
existing_type=sa.BOOLEAN(),
nullable=False)