<?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 Version20220413164208 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('ALTER TABLE artist DROP idu');
$this->addSql('ALTER TABLE artist_image DROP artist_idu');
$this->addSql('ALTER TABLE artist_image ADD CONSTRAINT FK_A531340CB7970CF8 FOREIGN KEY (artist_id) REFERENCES artist (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE lineup DROP idu');
$this->addSql('ALTER TABLE lineup ADD CONSTRAINT FK_CD7E0ECA2298D193 FOREIGN KEY (stage_id) REFERENCES stage (id)');
$this->addSql('ALTER TABLE lineup ADD CONSTRAINT FK_CD7E0ECAB7970CF8 FOREIGN KEY (artist_id) REFERENCES artist (id)');
$this->addSql('ALTER TABLE news DROP idu');
$this->addSql('ALTER TABLE news_image DROP news_idu');
$this->addSql('ALTER TABLE news_image ADD CONSTRAINT FK_BF828301B5A459A0 FOREIGN KEY (news_id) REFERENCES news (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE stage DROP idu');
$this->addSql('ALTER TABLE stage_image DROP stage_idu');
$this->addSql('ALTER TABLE stage_image ADD CONSTRAINT FK_459AB69B2298D193 FOREIGN KEY (stage_id) REFERENCES stage (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE artist ADD idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE artist_image DROP FOREIGN KEY FK_A531340CB7970CF8');
$this->addSql('ALTER TABLE artist_image ADD artist_idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE lineup DROP FOREIGN KEY FK_CD7E0ECA2298D193');
$this->addSql('ALTER TABLE lineup DROP FOREIGN KEY FK_CD7E0ECAB7970CF8');
$this->addSql('ALTER TABLE lineup ADD idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE news ADD idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE news_image DROP FOREIGN KEY FK_BF828301B5A459A0');
$this->addSql('ALTER TABLE news_image ADD news_idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE stage ADD idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE stage_image DROP FOREIGN KEY FK_459AB69B2298D193');
$this->addSql('ALTER TABLE stage_image ADD stage_idu BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
}
}