Device Update
* Backup Check Script noch mit meiner Email für Live Test * Backup Check bei Devices hinzugefügt * Migration
This commit is contained in:
33
db/migrations/20250519152455_device_add_check_backups.php
Normal file
33
db/migrations/20250519152455_device_add_check_backups.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class DeviceAddCheckBackups extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Device");
|
||||
$table->addColumn("backup_check", "integer", [ "default" => 1, "after" => "autobackup"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table('Pop');
|
||||
$table->removeColumn("backup_check");
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user