diff options
author | 2023-09-04 21:44:17 +0100 | |
---|---|---|
committer | 2023-09-04 21:44:46 +0100 | |
commit | b88a255fc86490ca798a96cfca05e8c0c0affc6d (patch) | |
tree | bc84b6ffce2ab1c62700b99e4d9b257424e2a5bf /alembic | |
parent | Also tag GHCR images with major version number (#75) (diff) |
Set nulled pending users to false in the new null constraints migration
Diffstat (limited to 'alembic')
-rw-r--r-- | alembic/versions/03655ce2097b_new_not_null_constraints_on_messages_.py | 2 |
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) |