Files
Submissions-App/alembic/versions/e08a69a0f381_attaching_process_to_.py
2024-01-08 08:51:23 -06:00

33 lines
934 B
Python

"""Attaching Process to SubmissionEquipmentAssociation
Revision ID: e08a69a0f381
Revises: 10c47a04559d
Create Date: 2024-01-05 14:50:55.681167
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e08a69a0f381'
down_revision = '10c47a04559d'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('_equipment_submissions', schema=None) as batch_op:
batch_op.create_foreign_key('SEA_Process_id', '_process', ['process'], ['id'], ondelete='SET NULL')
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('_equipment_submissions', schema=None) as batch_op:
batch_op.drop_constraint('SEA_Process_id', type_='foreignkey')
# ### end Alembic commands ###