Files
MemoryBear/api/migrations/versions/818c6c535e14_202603161825.py
2026-03-16 18:34:56 +08:00

35 lines
1.3 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""202603161825
Revision ID: 818c6c535e14
Revises: 12114b3e953c
Create Date: 2026-03-16 18:33:41.883671
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision: str = '818c6c535e14'
down_revision: Union[str, None] = '12114b3e953c'
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('agent_configs', sa.Column('features', postgresql.JSON(astext_type=sa.Text()), nullable=True, comment='功能特性配置'))
op.add_column('tool_configs', sa.Column('is_active', sa.Boolean(), server_default='true', nullable=False, comment='是否可用False表示已删除'))
op.create_index(op.f('ix_tool_configs_is_active'), 'tool_configs', ['is_active'], unique=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_tool_configs_is_active'), table_name='tool_configs')
op.drop_column('tool_configs', 'is_active')
op.drop_column('agent_configs', 'features')
# ### end Alembic commands ###