mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 09:42:38 -05:00
Prepare to stop inserting NotificationHistory at the time of inserting a notificaiton.
Need to remove foreign key to complaints. Make sure if getting Notification.id we look to both tables.
This commit is contained in:
21
migrations/versions/0293_drop_complaint_fk.py
Normal file
21
migrations/versions/0293_drop_complaint_fk.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0293_drop_complaint_fk
|
||||
Revises: 0292_give_users_folder_perms
|
||||
Create Date: 2019-05-16 14:05:18.104274
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
||||
|
||||
revision = '0293_drop_complaint_fk'
|
||||
down_revision = '0292_give_users_folder_perms'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_constraint('complaints_notification_id_fkey', table_name='complaints', type_='foreignkey')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.create_foreign_key('complaints_notification_id_fkey', 'complaints',
|
||||
'notification_history', ['notification_id'], ['id'])
|
||||
Reference in New Issue
Block a user