<?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 Version20211129113228 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_city (professional_profile_id INT NOT NULL, city_id INT NOT NULL, INDEX IDX_F04A5632FB976A01 (professional_profile_id), INDEX IDX_F04A56328BAC62AF (city_id), PRIMARY KEY(professional_profile_id, city_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE professional_profile_city ADD CONSTRAINT FK_F04A5632FB976A01 FOREIGN KEY (professional_profile_id) REFERENCES professional_profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE professional_profile_city ADD CONSTRAINT FK_F04A56328BAC62AF FOREIGN KEY (city_id) REFERENCES city (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_city');
}
}