| 1 | """Add ai report trigger table |
| 2 | |
| 3 | Revision ID: 41a7b41cd83a |
| 4 | Revises: d0da7a384546 |
| 5 | Create Date: 2026-04-09 11:50:17.959915 |
| 6 | |
| 7 | """ |
| 8 | from typing import Sequence |
| 9 | from typing import Union |
| 10 | |
| 11 | import sqlalchemy as sa |
| 12 | |
| 13 | from alembic import op |
| 14 | |
| 15 | # revision identifiers, used by Alembic. |
| 16 | revision: str = "41a7b41cd83a" |
| 17 | down_revision: Union[str, None] = "d0da7a384546" |
| 18 | branch_labels: Union[str, Sequence[str], None] = None |
| 19 | depends_on: Union[str, Sequence[str], None] = None |
| 20 | |
| 21 | |
| 22 | def upgrade() -> None: |
| 23 | # ### commands auto generated by Alembic - please adjust! ### |
| 24 | op.create_table( |
| 25 | "incident_management_ai_analyst_trigger_enabled", |
| 26 | sa.Column("id", sa.Integer(), nullable=False), |
| 27 | sa.Column("customer_code", sa.String(length=50), nullable=False), |
| 28 | sa.Column("enabled", sa.Boolean(), nullable=False), |
| 29 | sa.PrimaryKeyConstraint("id"), |
| 30 | sa.UniqueConstraint("customer_code"), |
| 31 | ) |
| 32 | # ### end Alembic commands ### |
| 33 | |
| 34 | |
| 35 | def downgrade() -> None: |
| 36 | # ### commands auto generated by Alembic - please adjust! ### |
| 37 | op.drop_table("incident_management_ai_analyst_trigger_enabled") |
| 38 | # ### end Alembic commands ### |