misp-modules/website/migrations/versions/91f830996ff4_.py

35 lines
971 B
Python

"""empty message
Revision ID: 91f830996ff4
Revises: d6f8bfc9d454
Create Date: 2024-02-09 09:51:11.639862
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '91f830996ff4'
down_revision = 'd6f8bfc9d454'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('session_db', schema=None) as batch_op:
batch_op.add_column(sa.Column('query_date', sa.DateTime(), nullable=True))
batch_op.create_index(batch_op.f('ix_session_db_query_date'), ['query_date'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('session_db', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_session_db_query_date'))
batch_op.drop_column('query_date')
# ### end Alembic commands ###