From 1378c45ba1d3f2f3291c71390798e70abb52b87a Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Wed, 22 Nov 2017 14:46:14 +0000 Subject: [PATCH 1/2] Add a column to Notifications to store the reply_to_text. This is text value of the sender_id, depending on the channel this will be a SMS sender, email reply to address or a letter contact block. This is the first PR in a series to refactor how we send the "reply_to" the provider, eventually we can eliminate the notification_to_sms_sender and notification_to_email_to tables. --- .../0144_add_notification_reply_to.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 migrations/versions/0144_add_notification_reply_to.py diff --git a/migrations/versions/0144_add_notification_reply_to.py b/migrations/versions/0144_add_notification_reply_to.py new file mode 100644 index 000000000..0a3a71bb4 --- /dev/null +++ b/migrations/versions/0144_add_notification_reply_to.py @@ -0,0 +1,21 @@ +""" + +Revision ID: 0144_add_notification_reply_to +Revises: 0143_remove_reply_to +Create Date: 2017-11-22 14:23:48.806781 + +""" +from alembic import op +import sqlalchemy as sa + + +revision = '0144_add_notification_reply_to' +down_revision = '0143_remove_reply_to' + + +def upgrade(): + op.add_column('notifications', sa.Column('reply_to_text', sa.String(), nullable=True)) + + +def downgrade(): + op.drop_column('notifications', 'reply_to_text') From 80db78e7a5cc9f9baf9cc827d13f2a78e536a336 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Thu, 23 Nov 2017 13:46:14 +0000 Subject: [PATCH 2/2] Fix merge conflict --- ...tion_reply_to.py => 0145_add_notification_reply_to.py} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename migrations/versions/{0144_add_notification_reply_to.py => 0145_add_notification_reply_to.py} (61%) diff --git a/migrations/versions/0144_add_notification_reply_to.py b/migrations/versions/0145_add_notification_reply_to.py similarity index 61% rename from migrations/versions/0144_add_notification_reply_to.py rename to migrations/versions/0145_add_notification_reply_to.py index 0a3a71bb4..25dfecd26 100644 --- a/migrations/versions/0144_add_notification_reply_to.py +++ b/migrations/versions/0145_add_notification_reply_to.py @@ -1,7 +1,7 @@ """ -Revision ID: 0144_add_notification_reply_to -Revises: 0143_remove_reply_to +Revision ID: 0145_add_notification_reply_to +Revises: 0144_template_service_letter Create Date: 2017-11-22 14:23:48.806781 """ @@ -9,8 +9,8 @@ from alembic import op import sqlalchemy as sa -revision = '0144_add_notification_reply_to' -down_revision = '0143_remove_reply_to' +revision = '0145_add_notification_reply_to' +down_revision = '0144_template_service_letter' def upgrade():