[add] migrations script

This commit is contained in:
Mark
2025-12-25 17:51:27 +08:00
parent 31918d5847
commit ac25b6ff11
2 changed files with 36 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
"""202512251740
Revision ID: 5531240c344d
Revises: 23f5ce1346ba
Create Date: 2025-12-25 17:47:06.575569
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '5531240c344d'
down_revision: Union[str, None] = '23f5ce1346ba'
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('builtin_tool_configs', sa.Column('is_enabled', sa.Boolean(), server_default='false', nullable=False))
op.add_column('builtin_tool_configs', sa.Column('requires_config', sa.Boolean(), server_default='false', nullable=False))
op.add_column('tool_configs', sa.Column('icon', sa.String(length=255), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('tool_configs', 'icon')
op.drop_column('builtin_tool_configs', 'requires_config')
op.drop_column('builtin_tool_configs', 'is_enabled')
# ### end Alembic commands ###