<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241231072324 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("CREATE TABLE `dp_failed_workorder_history` (
`id` int NOT NULL AUTO_INCREMENT,
`reason` varchar(255) NOT NULL,
`error_type` varchar(255) NOT NULL,
`import_id` int NOT NULL,
`customer_jit_call_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`created_by` int NOT NULL,
`created_at` date NOT NULL,
PRIMARY KEY (`id`),
KEY `import_id` (`import_id`),
KEY `created_by` (`created_by`),
CONSTRAINT `dp_failed_workorder_history_ibfk_1` FOREIGN KEY (`import_id`) REFERENCES `tc_imports` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `dp_failed_workorder_history_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
");
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE dp_failed_workorder_history");
}
}