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
|
||||
from django.conf import settings
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -28,12 +29,16 @@ class Migration(migrations.Migration):
|
||||
(
|
||||
"picture",
|
||||
models.ForeignKey(
|
||||
related_name="people", to="sas.Picture", verbose_name="picture"
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="people",
|
||||
to="sas.Picture",
|
||||
verbose_name="picture",
|
||||
),
|
||||
),
|
||||
(
|
||||
"user",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="pictures",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
verbose_name="user",
|
||||
|
Reference in New Issue
Block a user