Files
thetool/db/migrations/20250304155250_timerecording_car_journal.php
Daniel Spitzer 93987b4341 Zeiterfassung Fahrzeugverwaltung neue Features:
* KM-Stand History
* Journal
* Neue Felder
2025-03-13 21:27:48 +01:00

36 lines
1.1 KiB
PHP

<?php
use Phinx\Migration\AbstractMigration;
final class TimerecordingCarJournal extends AbstractMigration
{
public function up(): void
{
if ($this->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") {
}
}
}
?>