<?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 Version20211001113918 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE discount_offer (discount_id INT NOT NULL, offer_id INT NOT NULL, INDEX IDX_2FC5FA94C7C611F (discount_id), INDEX IDX_2FC5FA953C674EE (offer_id), PRIMARY KEY(discount_id, offer_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE discount_offer ADD CONSTRAINT FK_2FC5FA94C7C611F FOREIGN KEY (discount_id) REFERENCES Discount (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE discount_offer ADD CONSTRAINT FK_2FC5FA953C674EE FOREIGN KEY (offer_id) REFERENCES new_offer (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
//_744B0D28D79EB4F FOREIGN KEY (statementline_id) REFERENCES StatementLine (id) ON UPDATE NO ACTION ON DELETE CASCADE');
}
}