Merge pull request #1452 from nkukard/nkupdates-migrations-fix

Fix user confirmed column migration issue
This commit is contained in:
Matt Scott 2023-03-14 17:22:34 -04:00 committed by GitHub
commit 57b4457add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ def upgrade():
with op.batch_alter_table('user') as batch_op:
user = sa.sql.table('user', sa.sql.column('confirmed'))
batch_op.execute(user.update().values(confirmed=False))
batch_op.alter_column('confirmed', nullable=False)
batch_op.alter_column('confirmed', nullable=False, existing_type=sa.Boolean(), existing_nullable=True, existing_server_default=False)
def downgrade():