File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1+ """031_modify_chat_record
2+
3+ Revision ID: bd2ed188b5bd
4+ Revises: c1d7ac00b3a8
5+ Create Date: 2025-07-21 17:27:55.985821
6+
7+ """
8+ from alembic import op
9+ import sqlalchemy as sa
10+ import sqlmodel .sql .sqltypes
11+ from sqlalchemy .dialects import postgresql
12+
13+ # revision identifiers, used by Alembic.
14+ revision = 'bd2ed188b5bd'
15+ down_revision = 'c1d7ac00b3a8'
16+ branch_labels = None
17+ depends_on = None
18+
19+
20+ def upgrade ():
21+ # ### commands auto generated by Alembic - please adjust! ###
22+ op .alter_column ('chat_record' , 'engine_type' ,
23+ existing_type = sa .VARCHAR (length = 64 ),
24+ nullable = True )
25+ # ### end Alembic commands ###
26+
27+
28+ def downgrade ():
29+ # ### commands auto generated by Alembic - please adjust! ###
30+ op .alter_column ('chat_record' , 'engine_type' ,
31+ existing_type = sa .VARCHAR (length = 64 ),
32+ nullable = False )
33+ # ### end Alembic commands ###
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class ChatRecord(SQLModel, table=True):
3636 finish_time : datetime = Field (sa_column = Column (DateTime (timezone = False ), nullable = True ))
3737 create_by : int = Field (sa_column = Column (BigInteger , nullable = True ))
3838 datasource : int = Field (sa_column = Column (BigInteger , nullable = True ))
39- engine_type : str = Field (max_length = 64 )
39+ engine_type : str = Field (max_length = 64 , nullable = True )
4040 question : str = Field (sa_column = Column (Text , nullable = True ))
4141 sql_answer : str = Field (sa_column = Column (Text , nullable = True ))
4242 sql : str = Field (sa_column = Column (Text , nullable = True ))
You can’t perform that action at this time.
0 commit comments