* Device Backups können nun automatisch übers Tool getriggert werden Zeiterfassung Update * Vorbereitung für ZA Buchungen
32 lines
809 B
PHP
32 lines
809 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class DeviceAddFieldAutobackup extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("Device", ["signed" => true]);
|
|
$table->addColumn("autobackup", "integer", ["null" => false, "default" => '0', "after" => "last_config_backup"]);
|
|
$table->update();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$this->table("Device")->removeColumn("autobackup")->save();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|