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:
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
||||
from django.db import migrations, models
|
||||
import django.utils.timezone
|
||||
from django.conf import settings
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -48,12 +49,16 @@ class Migration(migrations.Migration):
|
||||
(
|
||||
"club",
|
||||
models.ForeignKey(
|
||||
verbose_name="club", related_name="posters", to="club.Club"
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
verbose_name="club",
|
||||
related_name="posters",
|
||||
to="club.Club",
|
||||
),
|
||||
),
|
||||
(
|
||||
"moderator",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
verbose_name="moderator",
|
||||
blank=True,
|
||||
null=True,
|
||||
|
Reference in New Issue
Block a user