misp-modules/website/migrations/versions/0c02b861944b_.py

39 lines
1.1 KiB
Python

"""empty message
Revision ID: 0c02b861944b
Revises: ef119b41c5f2
Create Date: 2024-02-06 09:08:59.802932
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0c02b861944b'
down_revision = 'ef119b41c5f2'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('module', schema=None) as batch_op:
batch_op.add_column(sa.Column('request_on_query', sa.Boolean(), nullable=True))
with op.batch_alter_table('module__config', schema=None) as batch_op:
batch_op.drop_column('request_on_query')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('module__config', schema=None) as batch_op:
batch_op.add_column(sa.Column('request_on_query', sa.BOOLEAN(), nullable=True))
with op.batch_alter_table('module', schema=None) as batch_op:
batch_op.drop_column('request_on_query')
# ### end Alembic commands ###