NexusDash-izebra/migrations/versions/b470795db8e1_make_pet_owner_not_a_forein_key.py
Aaron Kimbre 78ed39905f sensible fix for pet names
and automoderation for pet names
2022-02-12 21:37:11 -06:00

29 lines
742 B
Python

"""make pet owner not a forein key
Revision ID: b470795db8e1
Revises: e3e8e05f27ee
Create Date: 2022-02-12 20:51:12.318782
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b470795db8e1'
down_revision = 'e3e8e05f27ee'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('pet_names_ibfk_1', 'pet_names', type_='foreignkey')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_foreign_key('pet_names_ibfk_1', 'pet_names', 'charinfo', ['owner_id'], ['id'], ondelete='CASCADE')
# ### end Alembic commands ###