sensible fix for pet names

and automoderation for pet names
This commit is contained in:
Aaron Kimbre
2022-02-12 21:37:11 -06:00
parent d63dd807e3
commit 78ed39905f
3 changed files with 62 additions and 31 deletions

View File

@@ -0,0 +1,28 @@
"""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 ###