mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-06 22:58:25 -04:00
more files
This commit is contained in:
@@ -7,6 +7,8 @@ Create Date: 2017-08-29 14:09:41.042061
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
from sqlalchemy import text
|
||||
|
||||
revision = '0130_service_email_reply_to_row'
|
||||
down_revision = '0129_add_email_auth_permission'
|
||||
|
||||
@@ -18,16 +20,25 @@ EMAIL_REPLY_TO_ID = 'b3a58d57-2337-662a-4cba-40792a9322f2'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.execute("""
|
||||
conn = op.get_bind()
|
||||
input_params = {
|
||||
"email_reply_to": EMAIL_REPLY_TO_ID,
|
||||
"notify_service_id": NOTIFY_SERVICE_ID
|
||||
}
|
||||
conn.execute(text("""
|
||||
INSERT INTO service_email_reply_to
|
||||
(id, service_id, email_address, is_default, created_at)
|
||||
VALUES
|
||||
('{}','{}', 'testsender@dispostable.com', 'f', NOW())
|
||||
""".format(EMAIL_REPLY_TO_ID, NOTIFY_SERVICE_ID))
|
||||
(:email_reply_to, :notify_service_id, 'testsender@dispostable.com', 'f', NOW())
|
||||
"""), input_params)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.execute("""
|
||||
conn = op.get_bind()
|
||||
input_params = {
|
||||
"email_reply_to": EMAIL_REPLY_TO_ID,
|
||||
}
|
||||
conn.execute(text("""
|
||||
DELETE FROM service_email_reply_to
|
||||
WHERE id = '{}'
|
||||
""".format(EMAIL_REPLY_TO_ID))
|
||||
WHERE id = :email_reply_to
|
||||
"""), input_params)
|
||||
|
||||
Reference in New Issue
Block a user