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 withmoderation_text
is created for each of them. -
(See #270 (closed))Audiofile.episode
is removed. For audiofiles belonging to an episode we create aRadioReport
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 #269 (closed)) The data is moved into moderation sequence items as follows:EpisodeItem
is removed.-
internalnote
is moved tointernal_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 inModerationSequenceItem
.
-
-
A Moderation
will be discarded if it is not used in anyRadioReport
oderEpisode
. Referenced moderations will be migrated as follows:-
name
is moved tointernal_note
-
note
can be migrated to a moderation item with aninternal_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 aModerationSequenceItem
:-
content
goes intomoderation_text
-
folder
andname
go intointernal_note
-
audiofile
(see it? ;)) -
length
is discarded (Doesn'tAudiofile
already contain alength
attribute?)
-
We might even want to merge Episode
into RadioReport
- would be nice, but we leave it for the future.
Edited by Robert