dify/api/migrations/versions/9fafbd60eca1_add_message_file_belongs_to.py
Yeuoly 86286e1ac8
Feat/assistant app (#2086)
Co-authored-by: chenhe <guchenhe@gmail.com>
Co-authored-by: Pascal M <11357019+perzeuss@users.noreply.github.com>
2024-01-23 19:58:23 +08:00

33 lines
831 B
Python

"""add message file belongs to
Revision ID: 9fafbd60eca1
Revises: 4823da1d26cf
Create Date: 2024-01-15 13:07:20.340896
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9fafbd60eca1'
down_revision = '4823da1d26cf'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('message_files', schema=None) as batch_op:
batch_op.add_column(sa.Column('belongs_to', sa.String(length=255), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('message_files', schema=None) as batch_op:
batch_op.drop_column('belongs_to')
# ### end Alembic commands ###