Add notification status for returned letters

We need to update letter notifications with a new status when DVLA
gives us a list of references for returned letters.

This adds the new status to the models and the DB.

DVLA call this 'returned mail', so I'm using it as the status name
since it seems less ambiguous than 'returned'.
This commit is contained in:
Alexey Bezhan
2018-08-21 16:45:10 +01:00
parent db64423ca8
commit 0dcf04def9
5 changed files with 42 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
"""
Revision ID: 0224_returned_letter_status
Revises: 0223_add_domain_constraint
Create Date: 2018-08-21 14:44:04.203480
"""
from alembic import op
revision = '0224_returned_letter_status'
down_revision = '0223_add_domain_constraint'
def upgrade():
op.execute("INSERT INTO notification_status_types (name) VALUES ('returned-letter')")
def downgrade():
op.execute("DELETE FROM notification_status_types WHERE name='returned-letter'")