From aa88252cf7d89ace61d1ad2a463d1fcdecd74747 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Thu, 18 Jul 2019 15:16:37 +0100 Subject: [PATCH] Drop making crown not nullable on downgrade as it would fail anyway --- migrations/versions/0299_org_types_table.py | 2 -- tests/app/organisation/test_rest.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/migrations/versions/0299_org_types_table.py b/migrations/versions/0299_org_types_table.py index 667830bdf..bc7df5cd7 100644 --- a/migrations/versions/0299_org_types_table.py +++ b/migrations/versions/0299_org_types_table.py @@ -43,5 +43,3 @@ def upgrade(): def downgrade(): op.execute('DROP TABLE organisation_types') - op.alter_column('services', 'crown', nullable=False) - op.alter_column('services_history', 'crown', nullable=False) diff --git a/tests/app/organisation/test_rest.py b/tests/app/organisation/test_rest.py index b6d0f0341..fa230e2c9 100644 --- a/tests/app/organisation/test_rest.py +++ b/tests/app/organisation/test_rest.py @@ -204,7 +204,7 @@ def test_post_create_organisation_existing_name_raises_400(admin_request, sample 'name': 'Service name', 'crown': False, 'organisation_type': 'foo', - }, 'organisation_type foo is not one of [central, local, nhs_central, nhs_local, emergency_service, school_or_college, other]'), # noqa + }, 'organisation_type foo is not one of [central, local, nhs_central, nhs, nhs_local, emergency_service, school_or_college, other]'), # noqa )) def test_post_create_organisation_with_missing_data_gives_validation_error( admin_request,