| 1 | """Add alert title field name table |
| 2 | |
| 3 | Revision ID: 7187bab836ab |
| 4 | Revises: 8af27c21d10c |
| 5 | Create Date: 2024-07-17 14:28:04.828930 |
| 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 = "7187bab836ab" |
| 17 | down_revision: Union[str, None] = "8af27c21d10c" |
| 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_alerttitlefieldname", |
| 26 | sa.Column("id", sa.Integer(), nullable=False), |
| 27 | sa.Column("source", sa.String(length=50), nullable=False), |
| 28 | sa.Column("field_name", sa.String(length=100), nullable=False), |
| 29 | sa.PrimaryKeyConstraint("id"), |
| 30 | ) |
| 31 | # ### end Alembic commands ### |
| 32 | |
| 33 | |
| 34 | def downgrade() -> None: |
| 35 | # ### commands auto generated by Alembic - please adjust! ### |
| 36 | op.drop_table("incident_management_alerttitlefieldname") |
| 37 | # ### end Alembic commands ### |