mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
7753ba2d37
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: jyong <718720800@qq.com>
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
"""messages columns set nullable
|
|
|
|
Revision ID: b5429b71023c
|
|
Revises: 42e85ed5564d
|
|
Create Date: 2024-03-07 09:52:00.846136
|
|
|
|
"""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b5429b71023c'
|
|
down_revision = '42e85ed5564d'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('messages', schema=None) as batch_op:
|
|
batch_op.alter_column('model_provider',
|
|
existing_type=sa.VARCHAR(length=255),
|
|
nullable=True)
|
|
batch_op.alter_column('model_id',
|
|
existing_type=sa.VARCHAR(length=255),
|
|
nullable=True)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('messages', schema=None) as batch_op:
|
|
batch_op.alter_column('model_id',
|
|
existing_type=sa.VARCHAR(length=255),
|
|
nullable=False)
|
|
batch_op.alter_column('model_provider',
|
|
existing_type=sa.VARCHAR(length=255),
|
|
nullable=False)
|
|
|
|
# ### end Alembic commands ###
|