From 2b03e0f3a3b442e775469d9736bcc4965cbfe041 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 2 Sep 2025 11:27:03 +0000 Subject: [PATCH] Add new file --- ...30000_workorder_add_intervention_types.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 db/migrations/20250902130000_workorder_add_intervention_types.php diff --git a/db/migrations/20250902130000_workorder_add_intervention_types.php b/db/migrations/20250902130000_workorder_add_intervention_types.php new file mode 100644 index 000000000..54ff650a2 --- /dev/null +++ b/db/migrations/20250902130000_workorder_add_intervention_types.php @@ -0,0 +1,27 @@ +getEnvironment() == "thetool") { + $tenantConfigTable = $this->table('WorkorderTenantConfig'); + if (!$tenantConfigTable->hasColumn('interventionTypes')) { + $tenantConfigTable->addColumn('interventionTypes', 'text', ['null' => true, 'default' => null, 'after' => 'workorderCreationFilters']) + ->save(); + } + } + } + + public function down(): void { + if ($this->getEnvironment() == "thetool") { + $tenantConfigTable = $this->table('WorkorderTenantConfig'); + if ($tenantConfigTable->hasColumn('interventionTypes')) { + $tenantConfigTable->removeColumn('interventionTypes')->save(); + } + + } + } +}