Files
Submissions-App/alembic/versions/c4201b0ea9fe_adding_gel_image_info.py
2024-01-31 15:21:07 -06:00

43 lines
1.2 KiB
Python

"""adding gel image, info
Revision ID: c4201b0ea9fe
Revises: 70d5a751f579
Create Date: 2024-01-30 08:42:03.928933
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c4201b0ea9fe'
down_revision = '70d5a751f579'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
batch_op.create_unique_constraint("unique_ssa_id", ['id'])
with op.batch_alter_table('_wastewaterassociation', schema=None) as batch_op:
batch_op.alter_column('id',
existing_type=sa.INTEGER(),
nullable=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('_wastewaterassociation', schema=None) as batch_op:
batch_op.alter_column('id',
existing_type=sa.INTEGER(),
nullable=True)
with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
batch_op.drop_constraint("unique_ssa_id", type_='unique')
# ### end Alembic commands ###