added zabbix sync and view for Device
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php /** @noinspection ALL */
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class DeviceAddZabbixStatus extends AbstractMigration {
|
||||
public function up(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$Device = $this->table("Device");
|
||||
$Device->addColumn('zabbix_online', 'integer', ['null' => false, 'default' => 0]);
|
||||
$Device->addColumn('zabbix_host_id', 'integer', ['null' => true]);
|
||||
$Device->update();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$Device = $this->table("Device");
|
||||
$Device->removeColumn('zabbix_online');
|
||||
$Device->removeColumn('zabbix_host_id');
|
||||
$Device->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user