mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-11 07:42:20 -05:00
Add notification deletion to downgrade to respect foreign key constraints
This commit is contained in:
@@ -78,5 +78,7 @@ def upgrade():
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.execute("DELETE FROM templates_history WHERE id = '{}'".format(email_template_id))
|
||||
op.execute("DELETE FROM notifications WHERE template_id = '{}'".format(email_template_id))
|
||||
op.execute("DELETE FROM notification_history WHERE template_id = '{}'".format(email_template_id))
|
||||
op.execute("DELETE FROM templates WHERE id = '{}'".format(email_template_id))
|
||||
op.execute("DELETE FROM templates_history WHERE id = '{}'".format(email_template_id))
|
||||
|
||||
Reference in New Issue
Block a user