Files
thetool/db/migrations/20250812110000_rmlworkorder_update_status_enum.php
2025-08-12 16:26:37 +02:00

22 lines
823 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class RmlworkorderUpdateStatusEnum extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == 'thetool') {
$this->execute("ALTER TABLE `RMLWorkorder` MODIFY `status` enum('new','assigned','scheduled','correction_requested','documented','completed','intervention_required') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'new'");
}
}
public function down(): void
{
if ($this->getEnvironment() == 'thetool') {
$this->execute("ALTER TABLE `RMLWorkorder` MODIFY `status` enum('new','assigned','scheduled','documented','completed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'new'");
}
}
}