mirror of https://github.com/langgenius/dify.git
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:
parent
8e666b4704
commit
b8885fa029
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue