mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-24 19:41:50 -05:00
Merge pull request #3511 from alphagov/move-nhs-orgs-to-nhs-branding
Move existing NHS orgs without branding onto NHS branding
This commit is contained in:
31
migrations/versions/0368_move_orgs_to_nhs_branding_.py
Normal file
31
migrations/versions/0368_move_orgs_to_nhs_branding_.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0368_move_orgs_to_nhs_branding
|
||||
Revises: 0367_add_reach
|
||||
Create Date: 2022-04-12 18:22:12.069016
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
||||
revision = '0368_move_orgs_to_nhs_branding'
|
||||
down_revision = '0367_add_reach'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.execute("""
|
||||
UPDATE
|
||||
organisation
|
||||
SET
|
||||
email_branding_id = 'a7dc4e56-660b-4db7-8cff-12c37b12b5ea'
|
||||
WHERE
|
||||
organisation_type IN ('nhs_central', 'nhs_local', 'nhs_gp')
|
||||
AND
|
||||
email_branding_id IS NULL
|
||||
""")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user