<?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 Version20220718123005 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 formation_section_formation_capsule');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE formation_section_formation_capsule (formation_section_id INT NOT NULL, formation_capsule_id INT NOT NULL, INDEX IDX_494A108D208B3043 (formation_section_id), INDEX IDX_494A108D89EFD7D0 (formation_capsule_id), PRIMARY KEY(formation_section_id, formation_capsule_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE formation_section_formation_capsule ADD CONSTRAINT FK_494A108D208B3043 FOREIGN KEY (formation_section_id) REFERENCES formation_section (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE formation_section_formation_capsule ADD CONSTRAINT FK_494A108D89EFD7D0 FOREIGN KEY (formation_capsule_id) REFERENCES formation_capsule (id) ON DELETE CASCADE');
}
}