misp-modules/website/migrations/versions/3a631d400f60_.py

41 lines
1.2 KiB
Python
Raw Normal View History

"""empty message
Revision ID: 3a631d400f60
Revises: 183bf8fa2b87
Create Date: 2024-06-27 11:15:52.165895
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3a631d400f60'
down_revision = '183bf8fa2b87'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('external_tools',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('name', sa.String(length=64), nullable=True),
sa.Column('url', sa.String(), nullable=True),
sa.Column('is_active', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
with op.batch_alter_table('external_tools', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_external_tools_name'), ['name'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('external_tools', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_external_tools_name'))
op.drop_table('external_tools')
# ### end Alembic commands ###