<reponame>gregziegan/eviction-tracker
"""empty message

Revision ID: ac5be2b66a99
Revises: <KEY>
Create Date: 2021-04-04 08:56:40.633831

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ac5be2b66a99'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('phone_bank_tenants_phone_bank_event_id_fkey', 'phone_bank_tenants', type_='foreignkey')
    op.drop_constraint('phone_bank_tenants_defendant_id_fkey', 'phone_bank_tenants', type_='foreignkey')
    op.create_foreign_key(None, 'phone_bank_tenants', 'defendants', ['defendant_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'phone_bank_tenants', 'phone_bank_events', ['phone_bank_event_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'phone_bank_tenants', type_='foreignkey')
    op.drop_constraint(None, 'phone_bank_tenants', type_='foreignkey')
    op.create_foreign_key('phone_bank_tenants_defendant_id_fkey', 'phone_bank_tenants', 'defendants', ['defendant_id'], ['id'])
    op.create_foreign_key('phone_bank_tenants_phone_bank_event_id_fkey', 'phone_bank_tenants', 'phone_bank_events', ['phone_bank_event_id'], ['id'])
    # ### end Alembic commands ###

"""empty message

Revision ID: ac5be2b66a99
Revises: <KEY>
Create Date: 2021-04-04 08:56:40.633831

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ac5be2b66a99'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('phone_bank_tenants_phone_bank_event_id_fkey', 'phone_bank_tenants', type_='foreignkey')
    op.drop_constraint('phone_bank_tenants_defendant_id_fkey', 'phone_bank_tenants', type_='foreignkey')
    op.create_foreign_key(None, 'phone_bank_tenants', 'defendants', ['defendant_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'phone_bank_tenants', 'phone_bank_events', ['phone_bank_event_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'phone_bank_tenants', type_='foreignkey')
    op.drop_constraint(None, 'phone_bank_tenants', type_='foreignkey')
    op.create_foreign_key('phone_bank_tenants_defendant_id_fkey', 'phone_bank_tenants', 'defendants', ['defendant_id'], ['id'])
    op.create_foreign_key('phone_bank_tenants_phone_bank_event_id_fkey', 'phone_bank_tenants', 'phone_bank_events', ['phone_bank_event_id'], ['id'])
    # ### end Alembic commands ###
empty message  Revision ID: ac5be2b66a99 Revises: <KEY> Create Date: 2021-04-04 08:56:40.633831 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###