<?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 Version20221202095956 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 product_post_upsell (id INT AUTO_INCREMENT NOT NULL, product_id INT DEFAULT NULL, post_upsell_id INT DEFAULT NULL, position INT NOT NULL, INDEX IDX_3528A8054584665A (product_id), INDEX IDX_3528A8056088E7D9 (post_upsell_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE product_post_upsell ADD CONSTRAINT FK_3528A8054584665A FOREIGN KEY (product_id) REFERENCES product (id)');
$this->addSql('ALTER TABLE product_post_upsell ADD CONSTRAINT FK_3528A8056088E7D9 FOREIGN KEY (post_upsell_id) REFERENCES product (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE product_post_upsell');
}
}