From 396a5b7ed42ed7e38e62279e73b5439a722b2d7b Mon Sep 17 00:00:00 2001 From: inter Date: Mon, 8 Sep 2025 16:35:37 +0800 Subject: [PATCH] Add File --- .../versions/031_modify_chat_record.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 backend/alembic/versions/031_modify_chat_record.py diff --git a/backend/alembic/versions/031_modify_chat_record.py b/backend/alembic/versions/031_modify_chat_record.py new file mode 100644 index 0000000..aa391e2 --- /dev/null +++ b/backend/alembic/versions/031_modify_chat_record.py @@ -0,0 +1,33 @@ +"""031_modify_chat_record + +Revision ID: bd2ed188b5bd +Revises: c1d7ac00b3a8 +Create Date: 2025-07-21 17:27:55.985821 + +""" +from alembic import op +import sqlalchemy as sa +import sqlmodel.sql.sqltypes +from sqlalchemy.dialects import postgresql + +# revision identifiers, used by Alembic. +revision = 'bd2ed188b5bd' +down_revision = 'c1d7ac00b3a8' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column('chat_record', 'engine_type', + existing_type=sa.VARCHAR(length=64), + nullable=True) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column('chat_record', 'engine_type', + existing_type=sa.VARCHAR(length=64), + nullable=False) + # ### end Alembic commands ###