Migration1610523204AddInheritanceForProductCmsPage example

$database = $connection->fetchOne('select database();');

        $cmsPageColumnExist = $connection->fetchOne('SELECT 1 FROM information_schema.COLUMNS WHERE TABLE_NAME = \'product\' AND COLUMN_NAME = \'cmsPage\' AND TABLE_SCHEMA = "' . $database . '";');

        $connection->rollBack();

        if ($cmsPageColumnExist) {
            $connection->executeStatement('ALTER TABLE product DROP COLUMN cmsPage');
        }

        $migration = new Migration1610523204AddInheritanceForProductCmsPage();
        $migration->update($connection);

        $connection->beginTransaction();

        $expectedCmsPageId = Uuid::randomHex();

        $context = $this->createSalesChannelContext();

        $colorOptionId = Uuid::randomHex();

        $colorGroupId = Uuid::randomHex();

        
Home | Imprint | This part of the site doesn't use cookies.