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 8e666b4704
commit b8885fa029
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF
1 changed files with 3 additions and 0 deletions

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')