Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
src
/
Migrations
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/src/Migrations/Version20220726150131.php
<?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 Version20220726150131 extends AbstractMigration { public function up(Schema $schema) : void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE product CHANGE position position INT DEFAULT NULL'); $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD12469DE2 FOREIGN KEY (category_id) REFERENCES category (id)'); $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD350035DC FOREIGN KEY (weight_id) REFERENCES weight (id)'); $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD5C87D928 FOREIGN KEY (gamme_product_id) REFERENCES gamme (id)'); $this->addSql('ALTER TABLE command ADD payement_status VARCHAR(255) DEFAULT NULL'); $this->addSql('ALTER TABLE configuration CHANGE id id INT AUTO_INCREMENT NOT NULL'); $this->addSql('ALTER TABLE price_discount ADD CONSTRAINT FK_83568F19FBE72374 FOREIGN KEY (category_discount_id) REFERENCES category_discount (id)'); $this->addSql('ALTER TABLE price_discount ADD CONSTRAINT FK_83568F194584665A FOREIGN KEY (product_id) REFERENCES product (id)'); $this->addSql('ALTER TABLE page_block ADD CONSTRAINT FK_E59A68F4C4663E4 FOREIGN KEY (page_id) REFERENCES page (id)'); $this->addSql('ALTER TABLE product_image ADD CONSTRAINT FK_64617F034584665A FOREIGN KEY (product_id) REFERENCES product (id)'); $this->addSql('ALTER TABLE promotional CHANGE id id INT AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_CFAC5DA877153098 ON promotional (code)'); $this->addSql('ALTER TABLE slider CHANGE id id INT AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64992FC23A8 ON user (username_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649A0D96FBF ON user (email_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649C05FB297 ON user (confirmation_token)'); $this->addSql('ALTER TABLE command_product ADD CONSTRAINT FK_3C20574E33E1689A FOREIGN KEY (command_id) REFERENCES command (id)'); $this->addSql('ALTER TABLE command_product ADD CONSTRAINT FK_3C20574E4584665A FOREIGN KEY (product_id) REFERENCES product (id)'); $this->addSql('ALTER TABLE title_caracteristique ADD CONSTRAINT FK_17812224584665A FOREIGN KEY (product_id) REFERENCES product (id)'); $this->addSql('CREATE INDEX IDX_17812224584665A ON title_caracteristique (product_id)'); } public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE command DROP payement_status'); $this->addSql('ALTER TABLE command_product DROP FOREIGN KEY FK_3C20574E33E1689A'); $this->addSql('ALTER TABLE command_product DROP FOREIGN KEY FK_3C20574E4584665A'); $this->addSql('ALTER TABLE configuration CHANGE id id INT NOT NULL'); $this->addSql('ALTER TABLE page_block DROP FOREIGN KEY FK_E59A68F4C4663E4'); $this->addSql('ALTER TABLE price_discount DROP FOREIGN KEY FK_83568F19FBE72374'); $this->addSql('ALTER TABLE price_discount DROP FOREIGN KEY FK_83568F194584665A'); $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD12469DE2'); $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD350035DC'); $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD5C87D928'); $this->addSql('ALTER TABLE product CHANGE position position INT NOT NULL'); $this->addSql('ALTER TABLE product_image DROP FOREIGN KEY FK_64617F034584665A'); $this->addSql('ALTER TABLE promotional MODIFY id INT NOT NULL'); $this->addSql('DROP INDEX UNIQ_CFAC5DA877153098 ON promotional'); $this->addSql('ALTER TABLE promotional DROP PRIMARY KEY'); $this->addSql('ALTER TABLE promotional CHANGE id id INT NOT NULL'); $this->addSql('ALTER TABLE slider MODIFY id INT NOT NULL'); $this->addSql('ALTER TABLE slider DROP PRIMARY KEY'); $this->addSql('ALTER TABLE slider CHANGE id id INT NOT NULL'); $this->addSql('ALTER TABLE title_caracteristique DROP FOREIGN KEY FK_17812224584665A'); $this->addSql('DROP INDEX IDX_17812224584665A ON title_caracteristique'); $this->addSql('DROP INDEX UNIQ_8D93D64992FC23A8 ON user'); $this->addSql('DROP INDEX UNIQ_8D93D649A0D96FBF ON user'); $this->addSql('DROP INDEX UNIQ_8D93D649C05FB297 ON user'); } }