Merge branch 'spidev' into 'master'
Spidev See merge request fronk/thetool!1698
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class DevicetypeAddTemperature extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Devicetype");
|
||||
$table->addColumn("temp_warning", "integer", ['null' => false,'default' => '80', "after" => "power"]);
|
||||
$table->addColumn("temp_critical", "integer", ['null' => false,'default' => '90', "after" => "temp_warning"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("Devicetype")->removeColumn("temp_warning")->save();
|
||||
$this->table("Devicetype")->removeColumn("temp_critical")->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user