"""add holidays table Revision ID: h1h2h3h4h5h6 Revises: g1h2i3j4k5l6 Create Date: 2026-08-28 12:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa revision: str = 'h1h2h3h4h5h6' down_revision: Union[str, Sequence[str], None] = 'g1h2i3j4k5l6' branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: op.create_table( 'holidays', sa.Column('id', sa.Integer(), autoincrement=True, primary_key=True), sa.Column('day', sa.Date(), nullable=False, comment='放假日期'), sa.Column('name', sa.String(length=100), nullable=True, comment='放假说明(如国庆节)'), ) op.create_index('ix_holidays_day', 'holidays', ['day'], unique=True) def downgrade() -> None: op.drop_index('ix_holidays_day', table_name='holidays') op.drop_table('holidays')