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:
Umair Khan 2017-06-01 13:47:09 +05:00 committed by Tim Abbott
parent 9a9ee99129
commit 323fbdefa8
1 changed files with 2 additions and 1 deletions

View File

@ -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'),
),
]