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(); + } + + } + } +}