migrations/Version20231025052053.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.  * 
  8.  * Migration 5 - Changes from db change sprint 14
  9.  */
  10. final class Version20231025052053 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return '';
  15.     }
  16.     public function up(Schema $schema): void
  17.     {
  18.         $this->addSql("ALTER TABLE `tc_report_generation` CHANGE `type` `type` ENUM('table','chart','operator_performance') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;");
  19.         $this->addSql("ALTER TABLE `tc_report_generation_form_fields` ADD `field_label` VARCHAR(255) NULL DEFAULT NULL AFTER `field_type`;");
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         $this->addSql("ALTER TABLE `tc_report_generation` CHANGE `type` `type` ENUM('table','chart') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;");
  24.         $this->addSql("ALTER TABLE `tc_report_generation_form_fields` DROP `field_label`;");
  25.     }
  26. }