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/Version20211028133001.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 Version20211028133001 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE category_discount (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, code_unlock_discount VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE price_discount (id INT AUTO_INCREMENT NOT NULL, category_discount_id INT NOT NULL, product_id INT NOT NULL, price DOUBLE PRECISION NOT NULL, INDEX IDX_83568F19FBE72374 (category_discount_id), INDEX IDX_83568F194584665A (product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $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)'); } 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 price_discount DROP FOREIGN KEY FK_83568F19FBE72374'); $this->addSql('DROP TABLE category_discount'); $this->addSql('DROP TABLE price_discount'); } }