diff --git a/db/migrations/20250304155250_timerecording_car_journal.php b/db/migrations/20250304155250_timerecording_car_journal.php new file mode 100644 index 000000000..3e90600f9 --- /dev/null +++ b/db/migrations/20250304155250_timerecording_car_journal.php @@ -0,0 +1,36 @@ +getEnvironment() == "thetool") { + $table = $this->table("TimerecordingCarJournal", ["signed" => true]); + + $table->addColumn("TimerecordingCar_id", "integer", ["null" => true]); + $table->addColumn("journal", "text", ["null" => false]); + $table->addColumn("create_by", "integer", ["null" => false]); + $table->addColumn("edit_by", "integer", ["null" => false]); + $table->addColumn("create", "integer", ["null" => false]); + $table->addColumn("edit", "integer", ["null" => false]); + $table->save(); + } + + if ($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if ($this->getEnvironment() == "thetool") { + $this->table("TimerecordingCarJournal")->drop()->save(); + } + if ($this->getEnvironment() == "addressdb") { + } + } +} + +?> \ No newline at end of file diff --git a/db/migrations/20250304155311_timerecording_car_mileage_history.php b/db/migrations/20250304155311_timerecording_car_mileage_history.php new file mode 100644 index 000000000..a5eb49af5 --- /dev/null +++ b/db/migrations/20250304155311_timerecording_car_mileage_history.php @@ -0,0 +1,36 @@ +getEnvironment() == "thetool") { + $table = $this->table("TimerecordingCarMileageHistory", ["signed" => true]); + + $table->addColumn("TimerecordingCar_id", "integer", ["null" => true]); + $table->addColumn("mileage", "integer", ["null" => false]); + $table->addColumn("create_by", "integer", ["null" => false]); + $table->addColumn("edit_by", "integer", ["null" => false]); + $table->addColumn("create", "integer", ["null" => false]); + $table->addColumn("edit", "integer", ["null" => false]); + $table->save(); + } + + if ($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if ($this->getEnvironment() == "thetool") { + $this->table("TimerecordingCarMileageHistory")->drop()->save(); + } + if ($this->getEnvironment() == "addressdb") { + } + } +} + +?> \ No newline at end of file diff --git a/db/migrations/20250304165221_timerecording_car_add_field_override_approval.php b/db/migrations/20250304165221_timerecording_car_add_field_override_approval.php new file mode 100644 index 000000000..343195162 --- /dev/null +++ b/db/migrations/20250304165221_timerecording_car_add_field_override_approval.php @@ -0,0 +1,34 @@ +getEnvironment() == "thetool") { + $table = $this->table("TimerecordingCar", ["signed" => true]); + $table->addColumn("type", "integer", ["null" => true, "default" => 1, "after" => "user_id"]); + $table->addColumn("override_approval", "integer", ["null" => true, "default" => NULL, "after" => "initial_approval"]); + $table->addColumn("retired", "integer", ["null" => true, "default" => NULL, "after" => "timerecording"]); + $table->addColumn("retired_date", "integer", ["null" => true, "default" => NULL, "after" => "retired"]); + $table->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + $this->table("TimerecordingCar")->removeColumn("override_approval")->save(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +}