-
Notifications
You must be signed in to change notification settings - Fork 256
Open
Open
Copy link
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
As we will try to make the ChannelVersion more of a standard for querying channel version information in the future, we will need to migrate all the data that we already have stored in the channel.published_data field to ChannelVersion instances, and set the propper channel.version_info object, so that we make sure that all published channels have a channel.version_info object set.
For this:
- Query all
version>0Channels (note that we are not using thepublishedfield to support deleted channels). - Iterate through the channels using the .iterator() method to prevent loading all channels at once. For each channel:
- Create a
ChannelVersioninstance for each version present in itspublished_datafield. Use the data set in this object to populate the information in theChannelVersioninstance. If, for some reason,published_datais null, then manually create aChannelVersiononly for the current channel version. - Only for the current version of the channel:
- Set the created
ChannelVersioninstance as the channelversion_infofield. - If any of the following fields are missing:
included_licenses,included_categories,included_languages,non_distributable_licenses_included, orspecial_permissions_included, then:- Load the content database of that channel
- Compute all these properties. Try to reuse as much code as possible from the current fill_published_fields method.
- When creating the
AuditedSpecialPermissionsLicenseobjects, if the channel is public, then set thedistributablefield to true.
- Set the created
- Create a
Acceptance criteria
- All channels with a version > 0 should have their
version_infofield set. - All
published_dataversions of all channels are now available inChannelVersioninstances.
Metadata
Metadata
Assignees
Labels
No labels
