src/Migrations/Version20211007133458.php line 1
<?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 Version20211007133458 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 olympiad_review_file_relation (review_id INT NOT NULL, file_id INT NOT NULL, INDEX IDX_C7A895FF3E2E969B (review_id), INDEX IDX_C7A895FF93CB796C (file_id), PRIMARY KEY(review_id, file_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE olympiad_review_file_relation ADD CONSTRAINT FK_C7A895FF3E2E969B FOREIGN KEY (review_id) REFERENCES olympiad_reviews (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE olympiad_review_file_relation ADD CONSTRAINT FK_C7A895FF93CB796C FOREIGN KEY (file_id) REFERENCES files (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE olympiad_review_file_relation');
}
}