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/Version20211020171232.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 Version20211020171232 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('CREATE TABLE assortment_extra_set (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', assortment_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, ntf_id INT DEFAULT NULL, updated_at DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_2AD80D6BD7A15862 (assortment_id), INDEX IDX_NTF_ID (ntf_id), UNIQUE INDEX assortment_ntf (assortment_id, ntf_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('CREATE TABLE assortment_extra_set_product (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', extra_set_id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', product_id INT NOT NULL, position INT NOT NULL, is_active TINYINT(1) NOT NULL, updated_at DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_3E48911AC6D735B0 (extra_set_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('CREATE TABLE assortment_question_set (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', assortment_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ntf_id INT DEFAULT NULL, updated_at DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_FB23464D7A15862 (assortment_id), INDEX IDX_NTF_ID (ntf_id), UNIQUE INDEX assortment_ntf (assortment_id, ntf_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('CREATE TABLE assortment_question_set_question (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', question_set_id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', text VARCHAR(255) NOT NULL, sort INT NOT NULL, ntf_id INT DEFAULT NULL, updated_at DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_DE836D5D17A62210 (question_set_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('CREATE TABLE assortment_question_set_question_answer (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', question_id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', text VARCHAR(255) NOT NULL, section_id INT DEFAULT NULL, product_code VARCHAR(255) DEFAULT NULL, next_question_id INT DEFAULT NULL, product_id INT DEFAULT NULL, sort INT NOT NULL, ntf_id INT DEFAULT NULL, updated_at DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_E54B3DBD1E27F6BF (question_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('ALTER TABLE assortment_extra_set ADD CONSTRAINT FK_2AD80D6BD7A15862 FOREIGN KEY (assortment_id) REFERENCES assortment (id)');
            $this->addSql('ALTER TABLE assortment_extra_set_product ADD CONSTRAINT FK_3E48911AC6D735B0 FOREIGN KEY (extra_set_id) REFERENCES assortment_extra_set (id)');
            $this->addSql('ALTER TABLE assortment_question_set ADD CONSTRAINT FK_FB23464D7A15862 FOREIGN KEY (assortment_id) REFERENCES assortment (id)');
            $this->addSql('ALTER TABLE assortment_question_set_question ADD CONSTRAINT FK_DE836D5D17A62210 FOREIGN KEY (question_set_id) REFERENCES assortment_question_set (id)');
            $this->addSql('ALTER TABLE assortment_question_set_question_answer ADD CONSTRAINT FK_E54B3DBD1E27F6BF FOREIGN KEY (question_id) REFERENCES assortment_question_set_question (id)');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE assortment_extra_set_product DROP FOREIGN KEY FK_3E48911AC6D735B0');
            $this->addSql('ALTER TABLE assortment_question_set_question DROP FOREIGN KEY FK_DE836D5D17A62210');
            $this->addSql('ALTER TABLE assortment_question_set_question_answer DROP FOREIGN KEY FK_E54B3DBD1E27F6BF');
            $this->addSql('DROP TABLE assortment_extra_set');
            $this->addSql('DROP TABLE assortment_extra_set_product');
            $this->addSql('DROP TABLE assortment_question_set');
            $this->addSql('DROP TABLE assortment_question_set_question');
            $this->addSql('DROP TABLE assortment_question_set_question_answer');
        }
    
        public function isTransactional(): bool
        {
            return false;
        }
    }