mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 14:08:47 -04:00
Add notification deletion to downgrade to respect foreign key constraints
This commit is contained in:
@@ -78,5 +78,7 @@ def upgrade():
|
|||||||
|
|
||||||
|
|
||||||
def downgrade():
|
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 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