Fixed #33704 -- Updated postgres_tests migrations.

This commit is contained in:
Mariusz Felisiak 2022-05-13 11:23:21 +02:00 committed by GitHub
parent 19dc3f0f96
commit c112f837d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 15 deletions

View File

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