Add new file
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class WorkorderAddInterventionTypes extends AbstractMigration {
|
||||
public function up(): void {
|
||||
if ($this->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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user