<?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 Version20221219100359 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 payment_method_shop_mode (payment_method_id INT NOT NULL, shop_mode_id INT NOT NULL, INDEX IDX_7074E485AA1164F (payment_method_id), INDEX IDX_7074E4874D6C560 (shop_mode_id), PRIMARY KEY(payment_method_id, shop_mode_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE payment_method_shop_mode ADD CONSTRAINT FK_7074E485AA1164F FOREIGN KEY (payment_method_id) REFERENCES payment_method (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE payment_method_shop_mode ADD CONSTRAINT FK_7074E4874D6C560 FOREIGN KEY (shop_mode_id) REFERENCES shop_mode (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE payment_method_shop_mode DROP FOREIGN KEY FK_7074E485AA1164F');
$this->addSql('ALTER TABLE payment_method_shop_mode DROP FOREIGN KEY FK_7074E4874D6C560');
$this->addSql('DROP TABLE payment_method_shop_mode');
}
}