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/Version20211110131644.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 Version20211110131644 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 assortment_product DROP FOREIGN KEY FK_FEC70F5BB5B63A6B');
            $this->addSql('DROP INDEX IDX_FEC70F5BB5B63A6B ON assortment_product');
            $this->addSql('ALTER TABLE assortment_product DROP vat_id');
            $this->addSql('DROP INDEX IDX_NTF_ID ON vat');
            $this->addSql('ALTER TABLE vat ADD product_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', DROP ntf_id, CHANGE percentage percentage NUMERIC(10, 0) NOT NULL, CHANGE country_id country_code VARCHAR(255) NOT NULL');
            $this->addSql('ALTER TABLE vat ADD CONSTRAINT FK_84B322334584665A FOREIGN KEY (product_id) REFERENCES assortment_product (id)');
            $this->addSql('CREATE INDEX IDX_84B322334584665A ON vat (product_id)');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE assortment_product ADD vat_id CHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\'');
            $this->addSql('ALTER TABLE assortment_product ADD CONSTRAINT FK_FEC70F5BB5B63A6B FOREIGN KEY (vat_id) REFERENCES vat (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
            $this->addSql('CREATE INDEX IDX_FEC70F5BB5B63A6B ON assortment_product (vat_id)');
            $this->addSql('ALTER TABLE vat DROP FOREIGN KEY FK_84B322334584665A');
            $this->addSql('DROP INDEX IDX_84B322334584665A ON vat');
            $this->addSql('ALTER TABLE vat ADD ntf_id INT DEFAULT NULL, DROP product_id, CHANGE percentage percentage INT NOT NULL, CHANGE country_code country_id VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
            $this->addSql('CREATE INDEX IDX_NTF_ID ON vat (ntf_id)');
        }
    
        public function isTransactional(): bool
        {
            return false;
        }
    }