<?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 Version20230518193307 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 visiting_card_group (visiting_card_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_A88ACD01EB37EBA0 (visiting_card_id), INDEX IDX_A88ACD01FE54D947 (group_id), PRIMARY KEY(visiting_card_id, group_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE visiting_card_group ADD CONSTRAINT FK_A88ACD01EB37EBA0 FOREIGN KEY (visiting_card_id) REFERENCES visiting_card (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE visiting_card_group ADD CONSTRAINT FK_A88ACD01FE54D947 FOREIGN KEY (group_id) REFERENCES `group` (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 visiting_card_group');
}
}