mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
django2.2: add on_delete on migrations for ForeignKey
This commit is contained in:
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.contrib.auth.models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -79,6 +80,10 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name="subscription",
|
||||
name="member",
|
||||
field=models.ForeignKey(to="core.User", related_name="subscriptions"),
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="core.User",
|
||||
related_name="subscriptions",
|
||||
),
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user