src/Migrations/Version20210415203403.php line 1

  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 Version20210415203403 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE news CHANGE uuid uuid VARCHAR(36) NOT NULL');
  19.         $this->addSql('CREATE UNIQUE INDEX UNIQ_1DD39950D17F50A6 ON news (uuid)');
  20.         $this->addSql('ALTER TABLE olympiad CHANGE uuid uuid VARCHAR(36) NOT NULL');
  21.         $this->addSql('CREATE UNIQUE INDEX UNIQ_77700B8ED17F50A6 ON olympiad (uuid)');
  22.         $this->addSql('ALTER TABLE olympiad_stage CHANGE uuid uuid VARCHAR(36) NOT NULL');
  23.         $this->addSql('CREATE UNIQUE INDEX UNIQ_21AFE505D17F50A6 ON olympiad_stage (uuid)');
  24.         $this->addSql('ALTER TABLE organisation CHANGE uuid uuid VARCHAR(36) NOT NULL');
  25.         $this->addSql('CREATE UNIQUE INDEX UNIQ_E6E132B4D17F50A6 ON organisation (uuid)');
  26.     }
  27.     public function down(Schema $schema): void
  28.     {
  29.         // this down() migration is auto-generated, please modify it to your needs
  30.         $this->addSql('DROP INDEX UNIQ_1DD39950D17F50A6 ON news');
  31.         $this->addSql('ALTER TABLE news CHANGE uuid uuid VARCHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
  32.         $this->addSql('DROP INDEX UNIQ_77700B8ED17F50A6 ON olympiad');
  33.         $this->addSql('ALTER TABLE olympiad CHANGE uuid uuid VARCHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
  34.         $this->addSql('DROP INDEX UNIQ_21AFE505D17F50A6 ON olympiad_stage');
  35.         $this->addSql('ALTER TABLE olympiad_stage CHANGE uuid uuid VARCHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
  36.         $this->addSql('DROP INDEX UNIQ_E6E132B4D17F50A6 ON organisation');
  37.         $this->addSql('ALTER TABLE organisation CHANGE uuid uuid VARCHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
  38.     }
  39. }