Files
thetool/db/migrations/20250308144915_timerecording_car_documents.php
Daniel Spitzer 7d176779c9 Zeiterfassung neues Feature:
Features für Project 7832:
* Das Pickerldatum Zusatzfeld
* Auftrennen PKW und Anhänger
* Dokumente Upload
* Standardsortierung
* Ausgeschieden Flag mit Datum
* zusätzliche migration
2025-03-10 08:04:56 +01:00

41 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingCarDocuments extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingCarDocuments", ["signed" => true]);
$table->addColumn("file_id", "integer", ["null" => false]);
$table->addColumn("file_size", "integer", ["null" => false]);
$table->addColumn("timerecordingCar_id", "integer", ["null" => false]);
$table->addColumn("name", "string", ["null" => false]);
$table->addColumn("description", "text", ["null" => true]);
$table->addColumn("sort", "integer", ["null" => true]);
$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("TimerecordingCarDocuments")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}