mirror of https://github.com/zulip/zulip.git
zilencer: Add on_delete in foreign keys.
on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
This commit is contained in:
parent
9a9ee99129
commit
323fbdefa8
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,6 +37,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='remotepushdevicetoken',
|
||||
name='server',
|
||||
field=models.ForeignKey(to='zilencer.RemoteZulipServer'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zilencer.RemoteZulipServer'),
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue