Fixed -- Updated postgres_tests migrations.
@@ -110,7 +110,10 @@ class Migration(migrations.Migration):
),
),
("tags", ArrayField(TagField(), blank=True, null=True, size=None)),
- ("json", ArrayField(models.JSONField(default={}), default=[])),
+ (
+ "json",
+ ArrayField(models.JSONField(default=dict), default=list, size=None),
+ ),
("int_ranges", ArrayField(IntegerRangeField(), null=True, blank=True)),
(
"bigint_ranges",
@@ -134,7 +137,12 @@ class Migration(migrations.Migration):
primary_key=True,
),
),
- ("field", ArrayField(models.IntegerField(), size=None)),
+ (
+ "field",
+ ArrayField(
+ models.IntegerField(), blank=True, default=list, size=None
+ ),
+ ),
],
options={
"required_db_vendor": "postgresql",
@@ -182,7 +190,7 @@ class Migration(migrations.Migration):
(
"field_nested",
ArrayField(
- ArrayField(models.IntegerField(), size=None, null=True),
+ ArrayField(models.IntegerField(null=True), size=None),
size=None,
null=True,
),
@@ -233,9 +241,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
- models.SmallAutoField(
- verbose_name="ID", serialize=False, primary_key=True
- ),
+ models.SmallAutoField(serialize=False, primary_key=True),
),
],
options=None,
@@ -245,9 +251,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
- models.BigAutoField(
- verbose_name="ID", serialize=False, primary_key=True
- ),
+ models.BigAutoField(serialize=False, primary_key=True),
),
],
options=None,
@@ -290,7 +294,10 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="CITestModel",
fields=[
- ("name", CICharField(primary_key=True, max_length=255)),
+ (
+ "name",
+ CICharField(primary_key=True, serialize=False, max_length=255),
+ ),
("email", CIEmailField()),
("description", CITextField()),
("array_field", ArrayField(CITextField(), null=True)),
@@ -314,14 +321,12 @@ class Migration(migrations.Migration):
),
(
"scene",
- models.ForeignKey(
- "postgres_tests.Scene", on_delete=models.SET_NULL
- ),
+ models.ForeignKey("postgres_tests.Scene", on_delete=models.CASCADE),
),
(
"character",
models.ForeignKey(
- "postgres_tests.Character", on_delete=models.SET_NULL
+ "postgres_tests.Character", on_delete=models.CASCADE
),
),
("dialogue", models.TextField(blank=True, null=True)),
@@ -467,6 +472,15 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="RangeLookupsModel",
fields=[
+ (
+ "id",
+ models.AutoField(
+ verbose_name="ID",
+ serialize=False,
+ auto_created=True,
+ primary_key=True,
+ ),
+ ),
(
"parent",
models.ForeignKey(
@@ -508,7 +522,7 @@ class Migration(migrations.Migration):
),
(
"array_of_enums",
- ArrayField(EnumField(max_length=20), null=True, blank=True),
+ ArrayField(EnumField(max_length=20), size=None),
),
],
options={
