chore: fork from IRIS track 供 LICA 部门独立运行
- 复制来源: /home/yueli/track @ 192c8ee (feature/ai-audit-update) - 组织隔离目标: LICA - 端口规划: 前端 8030 / 后端 8031 / 数据库 8032 - 已排除 deploy.sh、deploy_full.sh、docker-compose.prod.yml(IRIS 生产发布脚本) - 已排除工作区未提交改动,取干净的 192c8ee 状态
This commit is contained in:
32
backend/alembic/versions/h1h2h3h4h5h6_add_holidays.py
Normal file
32
backend/alembic/versions/h1h2h3h4h5h6_add_holidays.py
Normal file
@ -0,0 +1,32 @@
|
||||
"""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')
|
||||
Reference in New Issue
Block a user