<?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 Version20221104172329 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 TABLE artobject_assignmentlink');
$this->addSql('DROP TABLE artobject_exhibitionlink');
$this->addSql('DROP TABLE artobject_tourlink');
$this->addSql('ALTER TABLE Map CHANGE path filename VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE artobject_assignmentlink (artobject_id INT NOT NULL, assignmentlink_id INT NOT NULL, INDEX IDX_FADA662154EA6A5D (artobject_id), INDEX IDX_FADA66216CB6C5EF (assignmentlink_id), PRIMARY KEY(artobject_id, assignmentlink_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE artobject_exhibitionlink (artobject_id INT NOT NULL, exhibitionlink_id INT NOT NULL, INDEX IDX_BE25A51454EA6A5D (artobject_id), INDEX IDX_BE25A51483C389D0 (exhibitionlink_id), PRIMARY KEY(artobject_id, exhibitionlink_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE artobject_tourlink (artobject_id INT NOT NULL, tourlink_id INT NOT NULL, INDEX IDX_2A8BEB6654EA6A5D (artobject_id), INDEX IDX_2A8BEB6661190218 (tourlink_id), PRIMARY KEY(artobject_id, tourlink_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE artobject_assignmentlink ADD CONSTRAINT FK_FADA662154EA6A5D FOREIGN KEY (artobject_id) REFERENCES ArtObject (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE artobject_assignmentlink ADD CONSTRAINT FK_FADA66216CB6C5EF FOREIGN KEY (assignmentlink_id) REFERENCES AssignmentLink (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE artobject_exhibitionlink ADD CONSTRAINT FK_BE25A51454EA6A5D FOREIGN KEY (artobject_id) REFERENCES ArtObject (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE artobject_exhibitionlink ADD CONSTRAINT FK_BE25A51483C389D0 FOREIGN KEY (exhibitionlink_id) REFERENCES ExhibitionLink (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE artobject_tourlink ADD CONSTRAINT FK_2A8BEB6654EA6A5D FOREIGN KEY (artobject_id) REFERENCES ArtObject (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE artobject_tourlink ADD CONSTRAINT FK_2A8BEB6661190218 FOREIGN KEY (tourlink_id) REFERENCES TourLink (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE Map CHANGE filename path VARCHAR(255) NOT NULL');
}
}