Alter old migrations so that they can downgrade

The Role -> User foreign key constraint was preventing roles from being
deleted once there were existing users referencing the role. I realized
it was best to just pass on the downgrade and allow the tables to be
deleted.
This commit is contained in:
richard-dds 2018-08-07 21:26:05 -04:00
parent e99ddd491a
commit dcb45c64e8
2 changed files with 2 additions and 15 deletions

View File

@ -34,6 +34,4 @@ def upgrade():
def downgrade():
db = op.get_bind()
db.execute("DELETE FROM roles WHERE name = 'default'")
pass

View File

@ -169,15 +169,4 @@ def upgrade():
def downgrade():
db = op.get_bind()
db.execute("""
DELETE FROM roles
WHERE name IN (
'ccpo',
'owner',
'admin',
'developer',
'billing_auditor',
'security_auditor'
);
""")
pass