addSql('ALTER TABLE merchant_config DROP FOREIGN KEY FK_3CA56895E511F091'); $this->addSql('ALTER TABLE merchant_config DROP FOREIGN KEY FK_3CA56895F5B7AF75'); $this->addSql('ALTER TABLE merchant_config DROP FOREIGN KEY FK_3CA56895FDD13F95'); $this->addSql('DROP INDEX UNIQ_3CA56895E511F091 ON merchant_config'); $this->addSql('DROP INDEX UNIQ_3CA56895F5B7AF75 ON merchant_config'); $this->addSql('DROP INDEX IDX_3CA56895FDD13F95 ON merchant_config'); $this->addSql('ALTER TABLE merchant_config ADD image_id INT DEFAULT NULL, ADD name VARCHAR(63) NOT NULL, ADD value LONGTEXT DEFAULT NULL, DROP credit_config_id, DROP address_id, DROP title, DROP description, DROP meta_title, DROP meta_description, DROP old_urls, DROP slug, DROP position, DROP status, CHANGE tax_rate_id merchant_id INT NOT NULL'); $this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA568956796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)'); $this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA568953DA5256D FOREIGN KEY (image_id) REFERENCES file (id)'); $this->addSql('CREATE INDEX IDX_3CA568956796D554 ON merchant_config (merchant_id)'); $this->addSql('CREATE INDEX IDX_3CA568953DA5256D ON merchant_config (image_id)'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE merchant_config DROP FOREIGN KEY FK_3CA568956796D554'); $this->addSql('ALTER TABLE merchant_config DROP FOREIGN KEY FK_3CA568953DA5256D'); $this->addSql('DROP INDEX IDX_3CA568956796D554 ON merchant_config'); $this->addSql('DROP INDEX IDX_3CA568953DA5256D ON merchant_config'); $this->addSql('ALTER TABLE merchant_config ADD address_id INT DEFAULT NULL, ADD title VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, ADD meta_title VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD meta_description LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD old_urls LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:array)\', ADD slug VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, ADD position DOUBLE PRECISION NOT NULL, ADD status DOUBLE PRECISION NOT NULL, DROP name, CHANGE image_id credit_config_id INT DEFAULT NULL, CHANGE merchant_id tax_rate_id INT NOT NULL, CHANGE value description LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`'); $this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA56895E511F091 FOREIGN KEY (credit_config_id) REFERENCES credit_config (id)'); $this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA56895F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)'); $this->addSql('ALTER TABLE merchant_config ADD CONSTRAINT FK_3CA56895FDD13F95 FOREIGN KEY (tax_rate_id) REFERENCES tax_rate (id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_3CA56895E511F091 ON merchant_config (credit_config_id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_3CA56895F5B7AF75 ON merchant_config (address_id)'); $this->addSql('CREATE INDEX IDX_3CA56895FDD13F95 ON merchant_config (tax_rate_id)'); } }