Skip to content

Data migration for new moderation datastructure

With #267 (closed) we suggest a new model ModerationSequenceItem. This is how we'd like to migrate existing data:

  • RadioReport.{in,ou}tro are removed. If set, a moderation item with moderation_text is created for each of them.
  • Audiofile.episode is removed. For audiofiles belonging to an episode we create a RadioReport instance for those files. An existing moderation sequence for the episode will be nested in a single new item containing a reference to the audiofile. (We need to check for the case of more than one audiofile for an episode which is not just a transcoded version of the first.) (See #270 (closed))
  • EpisodeItem is removed. (See #269 (closed)) The data is moved into moderation sequence items as follows:
    • internalnote is moved to internal_note
    • moderation is moved to a nested moderation sequence, see below
    • report doesn't need to be migrated, does it?
    • Maybe we want to create a counterpart for the time attribute in ModerationSequenceItem.
  • A Moderation will be discarded if it is not used in any RadioReport oder Episode. Referenced moderations will be migrated as follows:
    • name is moved to internal_note
    • note can be migrated to a moderation item with an internal_note (if set)
    • length will be discarded (so far)
    • We have no concept for contributions (RadioReport) with more than one moderation yet. Do we really need this in the beginning?
  • A ModerationItem is migrated to a ModerationSequenceItem:
    • content goes into moderation_text
    • folder and name go into internal_note
    • audiofile (see it? ;))
    • length is discarded (Doesn't Audiofile already contain a length attribute?)

We might even want to merge Episode into RadioReport - would be nice, but we leave it for the future.

Edited by Robert
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information