mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 18:38:14 -04:00
merge from main
This commit is contained in:
@@ -9,6 +9,8 @@ Create Date: 2016-06-13 11:04:15.888017
|
||||
# revision identifiers, used by Alembic.
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import text
|
||||
|
||||
revision = '0028_fix_reg_template_history'
|
||||
down_revision = '0026_rename_notify_service'
|
||||
|
||||
@@ -25,14 +27,24 @@ def upgrade():
|
||||
template_history_insert = """INSERT INTO templates_history (id, name, template_type, created_at,
|
||||
content, archived, service_id,
|
||||
subject, created_by_id, version)
|
||||
VALUES ('{}', '{}', '{}', '{}', '{}', False, '{}', '{}', '{}', 1)
|
||||
VALUES (:id, :name, :type, :time_now, :content, False, :service_id, :subject, :user_id, 1)
|
||||
"""
|
||||
email_verification_content = \
|
||||
"""Hi ((name)),\n\nTo complete your registration for GOV.UK Notify please click the link below\n\n((url))"""
|
||||
op.execute(template_history_insert.format('ece42649-22a8-4d06-b87f-d52d5d3f0a27',
|
||||
'Notify email verification code', 'email',
|
||||
datetime.utcnow(), email_verification_content, service_id,
|
||||
'Confirm GOV.UK Notify registration', user_id))
|
||||
|
||||
input_params = {
|
||||
"id": 'ece42649-22a8-4d06-b87f-d52d5d3f0a27',
|
||||
"name": 'Notify email verification code',
|
||||
"type": "email",
|
||||
"time_now": datetime.utcnow(),
|
||||
"content": email_verification_content,
|
||||
"service_id": service_id,
|
||||
"subject": 'Confirm GOV.UK Notify registration',
|
||||
"user_id": user_id
|
||||
}
|
||||
conn = op.get_bind()
|
||||
conn.execute(text(template_history_insert), input_params)
|
||||
|
||||
|
||||
def downgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
|
||||
Reference in New Issue
Block a user