diff --git a/migrations/Version20240514071702.php b/migrations/Version20240514071702.php new file mode 100644 index 000000000..d6e6eef97 --- /dev/null +++ b/migrations/Version20240514071702.php @@ -0,0 +1,43 @@ +connection->createSchemaManager()->listTableColumns('service'); + $columnExists = false; + foreach ($columns as $column) { + if ($column->getName() === 'production_entities_enabled') { + $columnExists = true; + break; + } + } + + if (!$columnExists) { + $this->addSql('ALTER TABLE service ADD production_entities_enabled TINYINT(1) NOT NULL DEFAULT 0'); + } + } +} \ No newline at end of file diff --git a/tests/integration/Application/CommandHandler/Service/EditServiceCommandHandlerTest.php b/tests/integration/Application/CommandHandler/Service/EditServiceCommandHandlerTest.php index 203dc2592..5a587cc95 100644 --- a/tests/integration/Application/CommandHandler/Service/EditServiceCommandHandlerTest.php +++ b/tests/integration/Application/CommandHandler/Service/EditServiceCommandHandlerTest.php @@ -53,6 +53,7 @@ public function test_it_can_process_an_edit_service_command() 'Foobar', 'team-foobar', false, + false, true, 'institution', 'not-applicable', @@ -115,6 +116,7 @@ public function test_it_rejects_non_existing_service() 'Foobar', 'team-foobar', false, + false, true, 'institution', 'not-applicable', @@ -145,6 +147,7 @@ public function test_it_rejects_non_unique_edit_service_command() 'team-foobar', false, false, + false, 'institution', 'not-applicable', 'no',