修改数据库分支
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
"""your message
|
||||
|
||||
Revision ID: aa17f8a032c9
|
||||
Revises: 8623aa4bf3a1
|
||||
Create Date: 2026-06-01 11:31:16.648791
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'aa17f8a032c9'
|
||||
down_revision: Union[str, None] = '8623aa4bf3a1'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('chat_generation_tasks', sa.Column('deleted_at', sa.DateTime(timezone=True), nullable=True))
|
||||
op.create_index(op.f('ix_chat_generation_tasks_deleted_at'), 'chat_generation_tasks', ['deleted_at'], unique=False)
|
||||
op.add_column('generation_records', sa.Column('deleted_at', sa.DateTime(timezone=True), nullable=True))
|
||||
op.create_index(op.f('ix_generation_records_deleted_at'), 'generation_records', ['deleted_at'], unique=False)
|
||||
op.add_column('projects', sa.Column('deleted_at', sa.DateTime(timezone=True), nullable=True))
|
||||
op.create_index(op.f('ix_projects_deleted_at'), 'projects', ['deleted_at'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_projects_deleted_at'), table_name='projects')
|
||||
op.drop_column('projects', 'deleted_at')
|
||||
op.drop_index(op.f('ix_generation_records_deleted_at'), table_name='generation_records')
|
||||
op.drop_column('generation_records', 'deleted_at')
|
||||
op.drop_index(op.f('ix_chat_generation_tasks_deleted_at'), table_name='chat_generation_tasks')
|
||||
op.drop_column('chat_generation_tasks', 'deleted_at')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user