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