Deprecated: Constant E_STRICT is deprecated in /data/web/apps/test2-bridge.kwalitaria.bluebirdday.io/releases/1/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /data/web/apps/test2-bridge.kwalitaria.bluebirdday.io/releases/1/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

migrations/Version20220815210819.php line 1

  1. <?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 Version20220815210819 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('DROP TABLE answer_extra_set');
            $this->addSql('DROP TABLE position_extra_set');
            $this->addSql('ALTER TABLE assortment_product_position ADD extra_set_ids LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
            $this->addSql('ALTER TABLE assortment_question_set_question_answer ADD extra_set_ids LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('CREATE TABLE answer_extra_set (answer_id CHAR(36) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\', extra_set_id CHAR(36) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\', INDEX IDX_C2136083AA334807 (answer_id), INDEX IDX_C2136083C6D735B0 (extra_set_id), PRIMARY KEY(answer_id, extra_set_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
            $this->addSql('CREATE TABLE position_extra_set (position_id CHAR(36) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\', extra_set_id CHAR(36) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\', INDEX IDX_AACDBE28C6D735B0 (extra_set_id), INDEX IDX_AACDBE28DD842E46 (position_id), PRIMARY KEY(position_id, extra_set_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
            $this->addSql('ALTER TABLE answer_extra_set ADD CONSTRAINT FK_C2136083AA334807 FOREIGN KEY (answer_id) REFERENCES assortment_question_set_question_answer (id) ON UPDATE NO ACTION ON DELETE CASCADE');
            $this->addSql('ALTER TABLE answer_extra_set ADD CONSTRAINT FK_C2136083C6D735B0 FOREIGN KEY (extra_set_id) REFERENCES assortment_extra_set (id) ON UPDATE NO ACTION ON DELETE CASCADE');
            $this->addSql('ALTER TABLE position_extra_set ADD CONSTRAINT FK_AACDBE28C6D735B0 FOREIGN KEY (extra_set_id) REFERENCES assortment_extra_set (id) ON UPDATE NO ACTION ON DELETE CASCADE');
            $this->addSql('ALTER TABLE position_extra_set ADD CONSTRAINT FK_AACDBE28DD842E46 FOREIGN KEY (position_id) REFERENCES assortment_product_position (id) ON UPDATE NO ACTION ON DELETE CASCADE');
            $this->addSql('ALTER TABLE assortment_product_position DROP extra_set_ids');
            $this->addSql('ALTER TABLE assortment_question_set_question_answer DROP extra_set_ids');
        }
    
        public function isTransactional(): bool
        {
            return false;
        }
    }