Removing platform_default as a concept. No service actually wants to send letters with the default hm-government logo so we are going to remove it as a constraint.

However, until we can create a letter without a logo, we will still default to hm-government, because the dvla_organisation is set on the service.
This does simplify the code.
Also removed the inserts to letter_branding in the data migration file, because we can deploy this before the rest of the work is finished. But we will need to do it later.
This commit is contained in:
Rebecca Law
2019-01-25 15:03:01 +00:00
parent 7ee1d67df7
commit e030c2be88
11 changed files with 65 additions and 85 deletions

View File

@@ -20,7 +20,6 @@ def upgrade():
sa.Column('name', sa.String(length=255), nullable=False),
sa.Column('filename', sa.String(length=255), nullable=False),
sa.Column('domain', sa.Text(), nullable=True),
sa.Column('platform_default', sa.Boolean(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('domain'),
sa.UniqueConstraint('filename'),
@@ -36,14 +35,6 @@ def upgrade():
op.get_bind()
op.execute("""INSERT INTO letter_branding (id, name, filename, domain, platform_default)
SELECT uuid_in(md5(random()::text)::cstring), name, filename, null, false
from dvla_organisation""")
op.execute("""UPDATE letter_branding set platform_default = True
WHERE filename='hm-government'
""")
def downgrade():
op.drop_table('service_letter_branding')