<?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 Version20211118235123 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 professional_profile_region (professional_profile_id INT NOT NULL, region_id INT NOT NULL, INDEX IDX_353E1E0CFB976A01 (professional_profile_id), INDEX IDX_353E1E0C98260155 (region_id), PRIMARY KEY(professional_profile_id, region_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE professional_profile_region ADD CONSTRAINT FK_353E1E0CFB976A01 FOREIGN KEY (professional_profile_id) REFERENCES professional_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE professional_profile_region ADD CONSTRAINT FK_353E1E0C98260155 FOREIGN KEY (region_id) REFERENCES region (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 professional_profile_region');
}
}