Skip to content

Add versioning for collection item_assets #388

@bitner

Description

@bitner

Currently, all items are dehydrated when they are added to the items table using the current value of item_assets for the items collection. This means that any field that is present in the collection item_assets is stripped from the assets in that item. Additionally, if there are any fields that were present in the collection item_assets, a special marker value is added to the item's assets to mark that we should not pull in the value from the collection item_assets.

Functionally, this means that if anything is modified or removed (additions are fine) in the collection's item_assets, when we rehydrate any item from that collection, the assets returned will not reflect those changes and additionally any of the special markers will make their way into the item that is returned (this is an issue both with db native hydration and api hydration).

In order to maintain backwards compatibility with previously written items, we should maintain versioning for collections (or at the least a collection's item_assets) so that we can point an item at the exact version of the collection that was used initially to dehydrate the item.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions