[add] migratinon script
This commit is contained in:
34
api/migrations/versions/e28bcc212da5_202603241530.py
Normal file
34
api/migrations/versions/e28bcc212da5_202603241530.py
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
"""202603241530
|
||||||
|
|
||||||
|
Revision ID: e28bcc212da5
|
||||||
|
Revises: 05a681a6ca93
|
||||||
|
Create Date: 2026-03-24 15:32:14.461480
|
||||||
|
|
||||||
|
"""
|
||||||
|
from typing import Sequence, Union
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision: str = 'e28bcc212da5'
|
||||||
|
down_revision: Union[str, None] = '05a681a6ca93'
|
||||||
|
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('memory_config', sa.Column('vision_id', sa.String(), nullable=True, comment='视觉模型配置ID'))
|
||||||
|
op.add_column('memory_config', sa.Column('audio_id', sa.String(), nullable=True, comment='语音模型配置ID'))
|
||||||
|
op.add_column('memory_config', sa.Column('video_id', sa.String(), nullable=True, comment='视频模型配置ID'))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('memory_config', 'video_id')
|
||||||
|
op.drop_column('memory_config', 'audio_id')
|
||||||
|
op.drop_column('memory_config', 'vision_id')
|
||||||
|
# ### end Alembic commands ###
|
||||||
Reference in New Issue
Block a user