CourseOverviews may be deleted, but we don't want to delete related objects
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.27 on 2020-01-15 20:22
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('course_modes', '0012_historicalcoursemode'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='coursemode',
|
||||
name='course',
|
||||
field=models.ForeignKey(db_constraint=False, on_delete=django.db.models.deletion.DO_NOTHING, related_name='modes', to='course_overviews.CourseOverview'),
|
||||
),
|
||||
]
|
||||
@@ -54,7 +54,7 @@ class CourseMode(models.Model):
|
||||
db_constraint=False,
|
||||
db_index=True,
|
||||
related_name='modes',
|
||||
on_delete=models.CASCADE,
|
||||
on_delete=models.DO_NOTHING,
|
||||
)
|
||||
|
||||
# Django sets the `course_id` property in __init__ with the value from the database
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.27 on 2020-01-15 20:22
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('entitlements', '0013_historicalcourseentitlementsupportdetail'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='courseentitlementsupportdetail',
|
||||
name='unenrolled_run',
|
||||
field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='course_overviews.CourseOverview'),
|
||||
),
|
||||
]
|
||||
@@ -499,7 +499,7 @@ class CourseEntitlementSupportDetail(TimeStampedModel):
|
||||
null=True,
|
||||
blank=True,
|
||||
db_constraint=False,
|
||||
on_delete=models.CASCADE,
|
||||
on_delete=models.DO_NOTHING,
|
||||
)
|
||||
|
||||
history = HistoricalRecords()
|
||||
|
||||
Reference in New Issue
Block a user