migrations/Version20211001113918.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20211001113918 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $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');
  18.         $this->addSql('ALTER TABLE discount_offer ADD CONSTRAINT FK_2FC5FA94C7C611F FOREIGN KEY (discount_id) REFERENCES Discount (id) ON DELETE CASCADE');
  19.         $this->addSql('ALTER TABLE discount_offer ADD CONSTRAINT FK_2FC5FA953C674EE FOREIGN KEY (offer_id) REFERENCES new_offer (id) ON DELETE CASCADE');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.        //_744B0D28D79EB4F FOREIGN KEY (statementline_id) REFERENCES StatementLine (id) ON UPDATE NO ACTION ON DELETE CASCADE');
  24.     }
  25. }