From a71ce9fb543c7108f8c606bc46674cfad0ff8cc7 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 28 Aug 2018 16:56:42 +0100 Subject: [PATCH] Add NHS logo for letters Matches: https://github.com/alphagov/notifications-template-preview/pull/192 --- .../versions/0218_another_letter_org.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 migrations/versions/0218_another_letter_org.py diff --git a/migrations/versions/0218_another_letter_org.py b/migrations/versions/0218_another_letter_org.py new file mode 100644 index 000000000..1ec9bd0d0 --- /dev/null +++ b/migrations/versions/0218_another_letter_org.py @@ -0,0 +1,35 @@ +"""empty message + +Revision ID: 0218_another_letter_org +Revises: 0217_default_email_branding + +""" + +# revision identifiers, used by Alembic. +revision = '0218_another_letter_org' +down_revision = '0217_default_email_branding' + +from alembic import op + + +NEW_ORGANISATIONS = [ + ('511', 'NHS'), +] + + +def upgrade(): + for numeric_id, name in NEW_ORGANISATIONS: + op.execute(""" + INSERT + INTO dvla_organisation + VALUES ('{}', '{}') + """.format(numeric_id, name)) + + +def downgrade(): + for numeric_id, _ in NEW_ORGANISATIONS: + op.execute(""" + DELETE + FROM dvla_organisation + WHERE id = '{}' + """.format(numeric_id))