"""empty message

Revision ID: b3aaa5a74b68
Revises: 7c7d5ec03974
Create Date: 2021-09-20 16:26:03.352183

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b3aaa5a74b68'
down_revision = '7c7d5ec03974'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('event_artifact_event_id_fkey', 'event_artifact', type_='foreignkey')
    op.drop_constraint('event_artifact_artifact_id_fkey', 'event_artifact', type_='foreignkey')
    op.create_foreign_key(None, 'event_artifact', 'artifact', ['artifact_id'], ['id'])
    op.create_foreign_key(None, 'event_artifact', 'events', ['event_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'event_artifact', type_='foreignkey')
    op.drop_constraint(None, 'event_artifact', type_='foreignkey')
    op.create_foreign_key('event_artifact_artifact_id_fkey', 'event_artifact', 'artifact', ['artifact_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key('event_artifact_event_id_fkey', 'event_artifact', 'events', ['event_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###
