Merge branch 'spidev' into 'master'

Zeiterfassung Update

See merge request fronk/thetool!276
This commit is contained in:
Frank Schubert
2024-03-05 13:07:07 +00:00
16 changed files with 515 additions and 87 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingAddFieldsHomeoffice extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Timerecording", ["signed" => true]);
$table->addColumn("homeoffice", "integer", ["null" => false, "default" => '0', "after" => "businesstrip_info"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Timerecording")->removeColumn("homeoffice")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingAddFieldsDays extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Timerecording", ["signed" => true]);
$table->addColumn("days", "integer", ["null" => false, "default" => '0', "after" => "end"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Timerecording")->removeColumn("days")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}