fix: Use a "through" model for the ManyToManyField fields in CourseSection
and CourseSectionSequence to ensure that cascading deletes will occur to delete the relation upon deletion of a foreign-keyed object. This commit is phase 1 of 3 in order to ensure a smooth deploy. The phases: 1) Add separate through models for user partition groups, add fields to point to the separate models, and start writing to those fields as well. 2) After all models have been re-generated, switch code over to use separate through model fields backed by the separate through models. 3) After phase 2 is deployed smoothly, remove the original ManyToManyField fields and rename the new fields to have the same name as the old fields.
Showing
- openedx/core/djangoapps/content/learning_sequences/api/outlines.py 11 additions, 0 deletions...ore/djangoapps/content/learning_sequences/api/outlines.py
- openedx/core/djangoapps/content/learning_sequences/migrations/0013_through_model_for_user_partition_groups_1.py 46 additions, 0 deletions...rations/0013_through_model_for_user_partition_groups_1.py
- openedx/core/djangoapps/content/learning_sequences/models.py 48 additions, 0 deletionsopenedx/core/djangoapps/content/learning_sequences/models.py
Please register or sign in to comment