Files
thetool/db/migrations/20240310193146_device_add_field_autobackup.php
Spitzer Daniel 6e02b849bd Device Update
* Device Backups können nun automatisch übers Tool getriggert werden

Zeiterfassung Update
 * Vorbereitung für ZA Buchungen
2024-03-10 21:25:23 +01:00

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") {
}
}
}