#[Package('core')]
class Migration1650620993SetDefaultCmsPagesAndSetCategoryCmsPageToNull extends MigrationStep
{ public function getCreationTimestamp(): int
{ return 1650620993;
} public function update(Connection
$connection): void
{ // set system config key for categories
$cmsPageId =
$this->
getDefaultCmsPageIdFromType('product_list',
$connection);
$this->
setSystemConfig(CategoryDefinition::CONFIG_KEY_DEFAULT_CMS_PAGE_CATEGORY,
$cmsPageId,
$connection);
// set system config key for products
$this->
setSystemConfig(ProductDefinition::CONFIG_KEY_DEFAULT_CMS_PAGE_PRODUCT, Defaults::CMS_PRODUCT_DETAIL_PAGE,
$connection);
$connection->
executeStatement('UPDATE category SET cms_page_id = null WHERE cms_page_id = :defaultCmsPageId;',
['defaultCmsPageId' => Uuid::
fromHexToBytes($cmsPageId)]);
} public function updateDestructive(Connection
$connection): void
{ }