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/Version20220729081651.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 Version20220729081651 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 product_feature (product_id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', feature_id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_CE0E6ED64584665A (product_id), INDEX IDX_CE0E6ED660E4B879 (feature_id), PRIMARY KEY(product_id, feature_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('CREATE TABLE feature (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', parent_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, ntf_id INT DEFAULT NULL, updated_at DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, INDEX IDX_NTF_ID (ntf_id), INDEX IDX_PARENT_ID (parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('ALTER TABLE product_feature ADD CONSTRAINT FK_CE0E6ED64584665A FOREIGN KEY (product_id) REFERENCES assortment_product (id) ON DELETE CASCADE');
            $this->addSql('ALTER TABLE product_feature ADD CONSTRAINT FK_CE0E6ED660E4B879 FOREIGN KEY (feature_id) REFERENCES feature (id) ON DELETE CASCADE');
            $this->addSql('ALTER TABLE assortment_product DROP feature_ids');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE product_feature DROP FOREIGN KEY FK_CE0E6ED660E4B879');
            $this->addSql('DROP TABLE product_feature');
            $this->addSql('DROP TABLE feature');
            $this->addSql('ALTER TABLE assortment_product ADD feature_ids LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
        }
    
        public function isTransactional(): bool
        {
            return false;
        }
    }