fix: delete soft-deleted conversations before dropping is_deleted column

Ensure any existing soft-deleted conversations are removed from the
database before dropping the is_deleted column in the migration.
This commit is contained in:
-LAN- 2025-09-03 10:15:34 +08:00
parent 74202586da
commit 979dec1dbc
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF

View File

@ -19,6 +19,9 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
# Delete any conversations where is_deleted is true before dropping the column
op.execute("DELETE FROM conversations WHERE is_deleted = true")
with op.batch_alter_table('conversations', schema=None) as batch_op:
batch_op.drop_column('is_deleted')