improve and add dashboard
This commit is contained in:
36
db/migrations/20260128074700_add_auto_complete_filter.php
Normal file
36
db/migrations/20260128074700_add_auto_complete_filter.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddAutoCompleteFilter extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() !== 'thetool') {
|
||||
return;
|
||||
}
|
||||
|
||||
$workorderTenantConfigTable = $this->table('WorkorderTenantConfig');
|
||||
if (!$workorderTenantConfigTable->hasColumn('autoCompleteFilter'))
|
||||
$workorderTenantConfigTable->addColumn('autoCompleteFilter', 'text', [
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_LONG,
|
||||
'after' => 'workorderActiveFilters',
|
||||
])
|
||||
->save();
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() !== 'thetool') {
|
||||
return;
|
||||
}
|
||||
|
||||
$workorderTenantConfigTable = $this->table('WorkorderTenantConfig');
|
||||
if ($workorderTenantConfigTable->hasColumn('autoCompleteFilter'))
|
||||
$workorderTenantConfigTable->removeColumn('autoCompleteFilter')->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user