From 42703dd30333421984fb6ffea5ada2b2b5e41146 Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Sun, 29 Dec 2024 19:52:47 +0100 Subject: [PATCH] Zeiterfassung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neue Migration für * BP Stunden Aufbuchen/Mindern * Spezialbuchungen ohne Verechnungstechnische relevanz --- ...ecording_employee_add_field_only_admin.php | 31 +++++++++++++++++++ ...3741_timerecording_add_field_hours_bpa.php | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 db/migrations/20241007121632_timerecording_employee_add_field_only_admin.php create mode 100644 db/migrations/20241229113741_timerecording_add_field_hours_bpa.php diff --git a/db/migrations/20241007121632_timerecording_employee_add_field_only_admin.php b/db/migrations/20241007121632_timerecording_employee_add_field_only_admin.php new file mode 100644 index 000000000..979694f2c --- /dev/null +++ b/db/migrations/20241007121632_timerecording_employee_add_field_only_admin.php @@ -0,0 +1,31 @@ +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") { + + } + } +} diff --git a/db/migrations/20241229113741_timerecording_add_field_hours_bpa.php b/db/migrations/20241229113741_timerecording_add_field_hours_bpa.php new file mode 100644 index 000000000..4d6d1ea50 --- /dev/null +++ b/db/migrations/20241229113741_timerecording_add_field_hours_bpa.php @@ -0,0 +1,31 @@ +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") { + + } + } +}