main
py 37 lines 1.04 KB
Raw
1 """Add ioc table for sources
2
3 Revision ID: 21a945c2982b
4 Revises: 33e4754d845b
5 Create Date: 2024-11-18 13:39:23.302575
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 = "21a945c2982b"
17 down_revision: Union[str, None] = "33e4754d845b"
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_iocfieldname",
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_iocfieldname")
37 # ### end Alembic commands ###