<?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 Version20240418141034 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('CREATE TABLE typologie_media (id INT AUTO_INCREMENT NOT NULL, typologie_id INT DEFAULT NULL, media_id INT DEFAULT NULL, UNIQUE INDEX UNIQ_FA24FC5E42F4634A (typologie_id), UNIQUE INDEX UNIQ_FA24FC5EEA9FDD75 (media_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET UTF8 COLLATE `UTF8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE typologie_media ADD CONSTRAINT FK_FA24FC5E42F4634A FOREIGN KEY (typologie_id) REFERENCES typologie (id)');
$this->addSql('ALTER TABLE typologie_media ADD CONSTRAINT FK_FA24FC5EEA9FDD75 FOREIGN KEY (media_id) REFERENCES media_hebergement (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE typologie_media');
}
}