Zeiterfassung

Neue Migration für
* BP Stunden Aufbuchen/Mindern
* Spezialbuchungen ohne Verechnungstechnische relevanz
This commit is contained in:
Daniel Spitzer
2024-12-29 19:52:47 +01:00
parent ecd4787ff6
commit 42703dd303
2 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingEmployeeAddFieldOnlyAdmin extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingEmployee", ["signed" => true]);
$table->addColumn("only_admin", "integer", ["null" => false, "default" => 0, "after" => "jobbike"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("TimerecordingEmployee")->removeColumn("only_admin")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingAddFieldHoursBpa extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("Timerecording", ["signed" => true]);
$table->addColumn("hours_bpa", "integer", ["null" => true, "default" => NULL, "after" => "hours_overtime"]);
$table->update();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("Timerecording")->removeColumn("hours_bpa")->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}