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}troare removed. If set, a moderation item withmoderation_textis created for each of them. -
(See #270 (closed))Audiofile.episodeis removed. For audiofiles belonging to an episode we create aRadioReportinstance 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 #269 (closed)) The data is moved into moderation sequence items as follows:EpisodeItemis removed.-
internalnoteis moved tointernal_note -
moderationis moved to a nested moderation sequence, see below -
reportdoesn't need to be migrated, does it? -
Maybe we want to create a counterpart for the timeattribute inModerationSequenceItem.
-
-
A Moderationwill be discarded if it is not used in anyRadioReportoderEpisode. Referenced moderations will be migrated as follows:-
nameis moved tointernal_note -
notecan be migrated to a moderation item with aninternal_note(if set) -
lengthwill 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 ModerationItemis migrated to aModerationSequenceItem:-
contentgoes intomoderation_text -
folderandnamego intointernal_note -
audiofile(see it? ;)) -
lengthis discarded (Doesn'tAudiofilealready contain alengthattribute?)
-
We might even want to merge Episode into RadioReport - would be nice, but we leave it for the future.
Edited by Robert