migrations/Version20220413154916.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 Version20220413154916 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('DROP INDEX UNIQ_159968799B902AD ON artist');
  19.         $this->addSql('ALTER TABLE artist_image DROP FOREIGN KEY FK_A531340CB7970CF8');
  20.         $this->addSql('ALTER TABLE lineup DROP FOREIGN KEY FK_CD7E0ECAB7970CF8');
  21.         $this->addSql('ALTER TABLE artist CHANGE id id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
  22.         $this->addSql('UPDATE artist SET id=idu');
  23.         $this->addSql('ALTER TABLE artist_image CHANGE artist_id artist_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
  24.         $this->addSql('UPDATE artist_image SET artist_id=artist_idu');
  25.         $this->addSql('DROP INDEX UNIQ_CD7E0ECA99B902AD ON lineup');
  26.         $this->addSql('ALTER TABLE lineup DROP FOREIGN KEY FK_CD7E0ECA2298D193');
  27.         $this->addSql("ALTER TABLE lineup CHANGE id id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)', CHANGE stage_id stage_id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)', CHANGE artist_id artist_id BINARY(16) DEFAULT NULL COMMENT '(DC2Type:uuid)'");
  28.         $this->addSql('UPDATE artist SET id=idu');
  29.         $this->addSql('DROP INDEX UNIQ_1DD3995099B902AD ON news');
  30.         $this->addSql('ALTER TABLE news_image DROP FOREIGN KEY FK_BF828301B5A459A0');
  31.         $this->addSql("ALTER TABLE news CHANGE id id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
  32.         $this->addSql("ALTER TABLE news_image CHANGE news_id news_id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
  33.         $this->addSql('UPDATE news SET id=idu');
  34.         $this->addSql('UPDATE news_image SET news_id=news_idu');
  35.         $this->addSql("DROP INDEX UNIQ_C27C936999B902AD ON stage");
  36.         $this->addSql("ALTER TABLE stage_image DROP FOREIGN KEY FK_459AB69B2298D193");
  37.         $this->addSql("ALTER TABLE stage CHANGE id id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
  38.         $this->addSql("ALTER TABLE stage_image CHANGE stage_id stage_id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
  39.         $this->addSql("UPDATE stage SET id=idu");
  40.         $this->addSql("UPDATE stage_image SET stage_id=stage_idu");
  41.     }
  42.     public function down(Schema $schema): void
  43.     {
  44.     }
  45. }