diff --git a/app/models.py b/app/models.py index e3aeb3d13..2cb9b709e 100644 --- a/app/models.py +++ b/app/models.py @@ -116,7 +116,7 @@ class Service(db.Model, Versioned): secondary=user_to_service, backref=db.backref('user_to_service', lazy='dynamic')) restricted = db.Column(db.Boolean, index=False, unique=False, nullable=False) - research_mode = db.Column(db.Boolean, index=False, unique=False, nullable=True, default=False) + research_mode = db.Column(db.Boolean, index=False, unique=False, nullable=False, default=False) email_from = db.Column(db.Text, index=False, unique=True, nullable=False) created_by = db.relationship('User') created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False) diff --git a/migrations/versions/0046_organisations_and_branding.py b/migrations/versions/0046_organisations_and_branding.py index c03faf2ce..fc31bdcd7 100644 --- a/migrations/versions/0046_organisations_and_branding.py +++ b/migrations/versions/0046_organisations_and_branding.py @@ -33,6 +33,7 @@ def upgrade(): op.add_column('services_history', sa.Column('organisation_id', postgresql.UUID(as_uuid=True))) op.execute("INSERT INTO branding_type VALUES ('govuk'), ('org'), ('both')") + # insert UKVI data as initial test data. hex and crest pulled from alphagov/whitehall op.execute("""INSERT INTO organisation VALUES ( '9d25d02d-2915-4e98-874b-974e123e8536',