Skip to content

Commit

Permalink
Squash #805 - Correct SQL to pass in proper args
Browse files Browse the repository at this point in the history
  • Loading branch information
MackHalliday committed Oct 8, 2024
1 parent 5c17eaa commit 9ccf111
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions migrations/versions/0371_replace_template_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,23 @@
down_revision = '0370_notification_callback_url'

def upgrade():
# Replace only the URLs in the 'templates' table
op.execute("""
UPDATE templates
SET content = REPLACE(content, 'https://notification.alpha.canada.ca', 'https://api.va.gov/vanotify')
""")

# Replace only the URLs in the 'templates_history' table
op.execute("""
UPDATE templates_history
SET content = REPLACE(content, 'https://notification.alpha.canada.ca', 'https://api.va.gov/vanotify')
""")


def downgrade():
# Reverse the replacement of URLs in the 'templates' table
op.execute("""
UPDATE templates
SET content = REPLACE(content, 'https://api.va.gov/vanotify', 'https://notification.alpha.canada.ca')
""")

# Reverse the replacement of URLs in the 'templates_history' table
op.execute("""
UPDATE templates_history
SET content = REPLACE(content, 'https://api.va.gov/vanotify', 'https://notification.alpha.canada.ca')
Expand Down

0 comments on commit 9ccf111

Please sign in to comment.