<?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 Version20220413154916 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('DROP INDEX UNIQ_159968799B902AD ON artist');
$this->addSql('ALTER TABLE artist_image DROP FOREIGN KEY FK_A531340CB7970CF8');
$this->addSql('ALTER TABLE lineup DROP FOREIGN KEY FK_CD7E0ECAB7970CF8');
$this->addSql('ALTER TABLE artist CHANGE id id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('UPDATE artist SET id=idu');
$this->addSql('ALTER TABLE artist_image CHANGE artist_id artist_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('UPDATE artist_image SET artist_id=artist_idu');
$this->addSql('DROP INDEX UNIQ_CD7E0ECA99B902AD ON lineup');
$this->addSql('ALTER TABLE lineup DROP FOREIGN KEY FK_CD7E0ECA2298D193');
$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)'");
$this->addSql('UPDATE artist SET id=idu');
$this->addSql('DROP INDEX UNIQ_1DD3995099B902AD ON news');
$this->addSql('ALTER TABLE news_image DROP FOREIGN KEY FK_BF828301B5A459A0');
$this->addSql("ALTER TABLE news CHANGE id id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
$this->addSql("ALTER TABLE news_image CHANGE news_id news_id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
$this->addSql('UPDATE news SET id=idu');
$this->addSql('UPDATE news_image SET news_id=news_idu');
$this->addSql("DROP INDEX UNIQ_C27C936999B902AD ON stage");
$this->addSql("ALTER TABLE stage_image DROP FOREIGN KEY FK_459AB69B2298D193");
$this->addSql("ALTER TABLE stage CHANGE id id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
$this->addSql("ALTER TABLE stage_image CHANGE stage_id stage_id BINARY(16) NOT NULL COMMENT '(DC2Type:uuid)'");
$this->addSql("UPDATE stage SET id=idu");
$this->addSql("UPDATE stage_image SET stage_id=stage_idu");
}
public function down(Schema $schema): void
{
}
}