| 1 | """Add velo sigma rule exclusion table |
| 2 | |
| 3 | Revision ID: 53ca91e8a196 |
| 4 | Revises: 6ac2c9c193a8 |
| 5 | Create Date: 2025-04-21 12:50:23.321400 |
| 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 = "53ca91e8a196" |
| 17 | down_revision: Union[str, None] = "6ac2c9c193a8" |
| 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_velo_sigma_exclusion", |
| 26 | sa.Column("field_matches", sa.JSON(), nullable=True), |
| 27 | sa.Column("id", sa.Integer(), nullable=False), |
| 28 | sa.Column("name", sa.String(length=255), nullable=False), |
| 29 | sa.Column("description", sa.String(length=255), nullable=True), |
| 30 | sa.Column("channel", sa.String(length=255), nullable=True), |
| 31 | sa.Column("title", sa.String(length=255), nullable=True), |
| 32 | sa.Column("customer_code", sa.String(length=50), nullable=True), |
| 33 | sa.Column("created_by", sa.String(length=100), nullable=False), |
| 34 | sa.Column("created_at", sa.DateTime(), nullable=False), |
| 35 | sa.Column("last_matched_at", sa.DateTime(), nullable=True), |
| 36 | sa.Column("match_count", sa.Integer(), nullable=False), |
| 37 | sa.Column("enabled", sa.Boolean(), nullable=False), |
| 38 | sa.PrimaryKeyConstraint("id"), |
| 39 | ) |
| 40 | # ### end Alembic commands ### |
| 41 | |
| 42 | |
| 43 | def downgrade() -> None: |
| 44 | # ### commands auto generated by Alembic - please adjust! ### |
| 45 | op.drop_table("incident_management_velo_sigma_exclusion") |
| 46 | # ### end Alembic commands ### |