migrations: Swap out deprecated JSONField import in-place.

A deprecated import shouldn’t be used even in a migration, since the
migration will need to remain runnable in the future.  We never needed
a migration for this switch anyway; we just needed to edit the old
migration, since no actual state changes are involved.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-03-03 16:02:07 -08:00 committed by Tim Abbott
parent ccad00b7e9
commit e128f92ee1
2 changed files with 7 additions and 15 deletions

View File

@ -1,7 +1,6 @@
# Generated by Django 1.11.25 on 2019-11-06 22:40
import django.contrib.postgres.fields.jsonb
from django.db import migrations
from django.db import migrations, models
class Migration(migrations.Migration):
@ -14,6 +13,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="userprofile",
name="zoom_token",
field=django.contrib.postgres.fields.jsonb.JSONField(default=None, null=True),
field=models.JSONField(default=None, null=True),
),
]

View File

@ -1,24 +1,17 @@
# Generated by Django 3.1.5 on 2021-01-10 11:30
from django.db import migrations, models
from typing import List
from django.db import migrations
class Migration(migrations.Migration):
"""
This doesn't actually run any SQL, it's for Django's internal
tracking of changes to models only.
django.contrib.postgres.fields.JSONField is deprecated as of Django 3.1
and should be replaced by models.JSONField which offers the same functionality.
This empty migration is only retained for Django's tracking.
"""
dependencies = [
("zerver", "0309_userprofile_can_create_users"),
]
operations = [
migrations.AlterField(
model_name="userprofile",
name="zoom_token",
field=models.JSONField(default=None, null=True),
),
]
operations: List[migrations.operations.base.Operation] = []