migrations/Version20241231072324.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20241231072324 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         
  18.         $this->addSql("CREATE TABLE `dp_failed_workorder_history` (
  19.             `id` int NOT NULL AUTO_INCREMENT,
  20.             `reason` varchar(255) NOT NULL,
  21.             `error_type` varchar(255) NOT NULL,
  22.             `import_id` int NOT NULL,
  23.             `customer_jit_call_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  24.             `created_by` int NOT NULL,
  25.             `created_at` date NOT NULL,
  26.             PRIMARY KEY (`id`),
  27.             KEY `import_id` (`import_id`),
  28.             KEY `created_by` (`created_by`),
  29.             CONSTRAINT `dp_failed_workorder_history_ibfk_1` FOREIGN KEY (`import_id`) REFERENCES `tc_imports` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  30.             CONSTRAINT `dp_failed_workorder_history_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
  31.         ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  32.     ");
  33.     }
  34.     public function down(Schema $schema): void
  35.     {
  36.         $this->addSql("DROP TABLE dp_failed_workorder_history");
  37.     }
  38. }