diff --git a/db/migrations/20250314072102_timerecording_car_milage_history_add_deleted.php b/db/migrations/20250314072102_timerecording_car_milage_history_add_deleted.php index 5fe60b76f..28cfcacdf 100644 --- a/db/migrations/20250314072102_timerecording_car_milage_history_add_deleted.php +++ b/db/migrations/20250314072102_timerecording_car_milage_history_add_deleted.php @@ -9,6 +9,7 @@ final class TimerecordingCarMilageHistoryAddDeleted extends AbstractMigration { if($this->getEnvironment() == "thetool") { $table = $this->table("TimerecordingCarMileageHistory", ["signed" => true]); + $table->addColumn("mileage_timestamp", "integer", ["null" => true, 'default' => 0, "after" => "mileage"]); $table->addColumn("deleted", "integer", ["null" => false, 'default' => 0, "after" => "mileage_timestamp"]); $table->update(); } @@ -21,6 +22,7 @@ final class TimerecordingCarMilageHistoryAddDeleted extends AbstractMigration public function down(): void { if($this->getEnvironment() == "thetool") { + $this->table("TimerecordingCarMileageHistory")->removeColumn("mileage_timestamp")->save(); $this->table("TimerecordingCarMileageHistory")->removeColumn("deleted")->save(); }