migrations/Version20251028150408.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20251028150408 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 trade_in_loyalty_offer (trade_in_id INT NOT NULL, loyalty_offer_id INT NOT NULL, INDEX IDX_223818103AF4AED0 (trade_in_id), INDEX IDX_223818101C25730 (loyalty_offer_id), PRIMARY KEY(trade_in_id, loyalty_offer_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');$this->addSql('ALTER TABLE trade_in_loyalty_offer ADD CONSTRAINT FK_223818103AF4AED0 FOREIGN KEY (trade_in_id) REFERENCES trade_in (id) ON DELETE CASCADE');$this->addSql('ALTER TABLE trade_in_loyalty_offer ADD CONSTRAINT FK_223818101C25730 FOREIGN KEY (loyalty_offer_id) REFERENCES loyalty_offer (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 trade_in_loyalty_offer DROP FOREIGN KEY FK_223818103AF4AED0');$this->addSql('ALTER TABLE trade_in_loyalty_offer DROP FOREIGN KEY FK_223818101C25730');$this->addSql('DROP TABLE trade_in_loyalty_offer');}}