<?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 Version20211201093243 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 order_movement DROP FOREIGN KEY FK_15257746E23FC673');
$this->addSql('ALTER TABLE order_movement DROP FOREIGN KEY FK_15257746A73F0E34');
$this->addSql('DROP TABLE cooking_category');
$this->addSql('DROP TABLE cut_category');
$this->addSql('DROP TABLE destination_service');
$this->addSql('DROP INDEX IDX_15257746E23FC673 ON order_movement');
$this->addSql('DROP INDEX IDX_15257746A73F0E34 ON order_movement');
$this->addSql('ALTER TABLE order_movement DROP cut_category_id, DROP cooking_category_id, DROP first_reduction, DROP second_reduction');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE cooking_category (id INT AUTO_INCREMENT NOT NULL, name_fr VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_en VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_de VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_nl VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE cut_category (id INT AUTO_INCREMENT NOT NULL, name_fr VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_en VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_de VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_nl VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE destination_service (id INT AUTO_INCREMENT NOT NULL, name_fr VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_en VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_de VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, name_nl VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE order_movement ADD cut_category_id INT DEFAULT NULL, ADD cooking_category_id INT DEFAULT NULL, ADD first_reduction LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:array)\', ADD second_reduction LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:array)\'');
$this->addSql('ALTER TABLE order_movement ADD CONSTRAINT FK_15257746A73F0E34 FOREIGN KEY (cut_category_id) REFERENCES cut_category (id)');
$this->addSql('ALTER TABLE order_movement ADD CONSTRAINT FK_15257746E23FC673 FOREIGN KEY (cooking_category_id) REFERENCES cooking_category (id)');
$this->addSql('CREATE INDEX IDX_15257746E23FC673 ON order_movement (cooking_category_id)');
$this->addSql('CREATE INDEX IDX_15257746A73F0E34 ON order_movement (cut_category_id)');
}
}