Upgrade the ContentStorage module
Edit on GitHubUpgrading from version 1.* to version 2.*
Version 2.0.0 of the ContentStorage
module introduces the following changes:
- Changed storage key structure from
content:locale:id
tocontent:locale:key
. - Introduced the
spy_content_storage.content_key
field to store the identifier of content entities. - Removed deprecated
ExecutedContentStorageTransfer
. - Removed deprecated
ContentStorageClientInterface::findContentById()
. - Replaced
ContentStorageClientInterface::findContentTypeContext()
withContentStorageClientInterface::findContentTypeContextByKey()
. - Introduced the
ContentTypeContextTransfer::$key
transfer object property. - Introduced the
ContentStorageTransfer::$contentKey
transfer object property. - Increased the version of
spryker/content
in composer.json.
Estimated migration time: 30 minutes - 1h
To upgrade to the new version of the module, do the following:
-
Upgrade the
Content
module to version 2.0.0. See Upgrade the Content module for more details. -
Upgrade the
ContentStorage
module to version 2.0.0:
composer require spryker/content-storage:"^2.0.0" --update-with-dependencies
-
Truncate the
spy_content_storage
database table. -
Run the database migration:
console propel:install
- Run the following command to re-generate transfer objects:
console transfer:generate
- Sync all content entities to the new storage schema:
console sync:data content
- Verify that the
spy_content_storage.key
column uses keys instead of IDs. For example, content:en_us:apl-1, where apl-1 is a key of the content item.
Thank you!
For submitting the form