From a0deef06e23e4c81e55d83afb63d4bbab1bdaaa5 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 28 Aug 2018 14:38:51 +0100 Subject: [PATCH] =?UTF-8?q?Set=20branding=5Ftype=20to=20org=20if=20it?= =?UTF-8?q?=E2=80=99s=20none?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So later we can: - make it non-nullable later - remove `govuk` as an option This is mostly for people’s local databases, the manual work here has been done on production already. --- .../versions/0217_default_email_branding.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 migrations/versions/0217_default_email_branding.py diff --git a/migrations/versions/0217_default_email_branding.py b/migrations/versions/0217_default_email_branding.py new file mode 100644 index 000000000..caa185c0f --- /dev/null +++ b/migrations/versions/0217_default_email_branding.py @@ -0,0 +1,25 @@ +""" + Revision ID: 0217_default_email_branding +Revises: 0216_remove_colours +Create Date: 2018-08-24 13:36:49.346156 + """ +from alembic import op +from app.models import BRANDING_ORG + +revision = '0217_default_email_branding' +down_revision = '0216_remove_colours' + + +def upgrade(): + op.execute(""" + update + email_branding + set + brand_type = '{}' + where + brand_type = null + """.format(BRANDING_ORG)) + + +def downgrade(): + pass