Migration Guide - ContentStorage
- 1 Minute To Read
-
Print
-
DarkLight
Upgrading 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.
To upgrade to the new version of the module, do the following:
- Upgrade the
Content
module to version 2.0.0. See Migration Guide - Content 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.
Estimated migration time: 30 minutes - 1h
Was This Article Helpful?