Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.traiteur-75.fr_1689065491
/
htdocs
/
migrations
/
/srv/data/trash/vhost_www.traiteur-75.fr_1689065491/htdocs/migrations/Version20220608083407.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 Version20220608083407 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('ALTER TABLE product ADD category_id INT DEFAULT NULL, ADD subcategory_id 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_D34A04AD5DC6FE57 FOREIGN KEY (subcategory_id) REFERENCES sub_category (id)'); $this->addSql('CREATE INDEX IDX_D34A04AD12469DE2 ON product (category_id)'); $this->addSql('CREATE INDEX IDX_D34A04AD5DC6FE57 ON product (subcategory_id)'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD12469DE2'); $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD5DC6FE57'); $this->addSql('DROP INDEX IDX_D34A04AD12469DE2 ON product'); $this->addSql('DROP INDEX IDX_D34A04AD5DC6FE57 ON product'); $this->addSql('ALTER TABLE product DROP category_id, DROP subcategory_id'); } }