2015-01-28 20:35:27 +08:00
|
|
|
from django.db import migrations, models
|
2014-03-15 01:34:49 +08:00
|
|
|
|
2016-06-16 21:07:51 +08:00
|
|
|
from ..fields import (
|
2017-02-11 20:16:35 +08:00
|
|
|
ArrayField,
|
|
|
|
BigIntegerRangeField,
|
|
|
|
CICharField,
|
|
|
|
CIEmailField,
|
|
|
|
CITextField,
|
2019-02-04 07:27:19 +08:00
|
|
|
DateRangeField,
|
|
|
|
DateTimeRangeField,
|
|
|
|
DecimalRangeField,
|
|
|
|
EnumField,
|
2019-06-09 08:56:37 +08:00
|
|
|
HStoreField,
|
|
|
|
IntegerRangeField,
|
|
|
|
SearchVectorField,
|
2016-06-16 21:07:51 +08:00
|
|
|
)
|
2015-07-23 01:51:05 +08:00
|
|
|
from ..models import TagField
|
2015-04-05 00:10:26 +08:00
|
|
|
|
2014-03-15 01:34:49 +08:00
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
("postgres_tests", "0001_setup_extensions"),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="CharArrayModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
("field", ArrayField(models.CharField(max_length=10), size=None)),
|
2014-03-15 01:34:49 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2014-03-15 01:34:49 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="DateTimeArrayModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
("datetimes", ArrayField(models.DateTimeField(), size=None)),
|
|
|
|
("dates", ArrayField(models.DateField(), size=None)),
|
|
|
|
("times", ArrayField(models.TimeField(), size=None)),
|
2014-03-15 01:34:49 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2014-03-15 01:34:49 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="HStoreModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
("field", HStoreField(blank=True, null=True)),
|
2017-05-03 12:24:54 +08:00
|
|
|
("array_field", ArrayField(HStoreField(), null=True)),
|
2014-03-15 01:34:49 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2014-03-15 01:34:49 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
2015-01-11 02:13:28 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="OtherTypesArrayModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2018-09-19 04:14:44 +08:00
|
|
|
(
|
|
|
|
"ips",
|
|
|
|
ArrayField(models.GenericIPAddressField(), size=None, default=list),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2018-09-19 04:14:44 +08:00
|
|
|
("uuids", ArrayField(models.UUIDField(), size=None, default=list)),
|
|
|
|
(
|
|
|
|
"decimals",
|
|
|
|
ArrayField(
|
|
|
|
models.DecimalField(max_digits=5, decimal_places=2),
|
|
|
|
size=None,
|
|
|
|
default=list,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-07-23 01:51:05 +08:00
|
|
|
("tags", ArrayField(TagField(), blank=True, null=True, size=None)),
|
2019-06-09 08:56:37 +08:00
|
|
|
("json", ArrayField(models.JSONField(default={}), default=[])),
|
2018-07-27 23:35:54 +08:00
|
|
|
("int_ranges", ArrayField(IntegerRangeField(), null=True, blank=True)),
|
|
|
|
(
|
|
|
|
"bigint_ranges",
|
|
|
|
ArrayField(BigIntegerRangeField(), null=True, blank=True),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-01-11 02:13:28 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2015-01-11 02:13:28 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
2014-03-15 01:34:49 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="IntegerArrayModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
("field", ArrayField(models.IntegerField(), size=None)),
|
2014-03-15 01:34:49 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2014-03-15 01:34:49 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="NestedIntegerArrayModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
(
|
|
|
|
"field",
|
|
|
|
ArrayField(ArrayField(models.IntegerField(), size=None), size=None),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2014-03-15 01:34:49 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2014-03-15 01:34:49 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="NullableIntegerArrayModel",
|
|
|
|
fields=[
|
2019-11-01 19:08:03 +08:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
(
|
|
|
|
"field",
|
2015-04-05 00:10:26 +08:00
|
|
|
ArrayField(models.IntegerField(), size=None, null=True, blank=True),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
|
|
|
(
|
2019-11-01 19:08:03 +08:00
|
|
|
"field_nested",
|
2017-05-03 13:25:30 +08:00
|
|
|
ArrayField(
|
2015-04-05 00:10:26 +08:00
|
|
|
ArrayField(models.IntegerField(), size=None, null=True),
|
|
|
|
size=None,
|
2015-06-01 05:45:03 +08:00
|
|
|
null=True,
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
|
|
|
),
|
2020-12-03 16:30:33 +08:00
|
|
|
("order", models.IntegerField(null=True)),
|
2014-03-15 01:34:49 +08:00
|
|
|
],
|
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2014-03-15 01:34:49 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
2014-09-06 04:53:11 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="CharFieldModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2021-09-15 18:57:49 +08:00
|
|
|
("field", models.CharField(max_length=64)),
|
2014-09-06 04:53:11 +08:00
|
|
|
],
|
|
|
|
options=None,
|
|
|
|
bases=None,
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="TextFieldModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2014-09-06 04:53:11 +08:00
|
|
|
("field", models.TextField()),
|
|
|
|
],
|
|
|
|
options=None,
|
|
|
|
bases=None,
|
|
|
|
),
|
2019-12-05 16:54:27 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="SmallAutoFieldModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.SmallAutoField(
|
|
|
|
verbose_name="ID", serialize=False, primary_key=True
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2019-12-05 16:54:27 +08:00
|
|
|
],
|
|
|
|
options=None,
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="BigAutoFieldModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.BigAutoField(
|
|
|
|
verbose_name="ID", serialize=False, primary_key=True
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2019-12-05 16:54:27 +08:00
|
|
|
],
|
|
|
|
options=None,
|
|
|
|
),
|
2015-06-01 05:45:03 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="Scene",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2021-05-29 06:52:57 +08:00
|
|
|
("scene", models.TextField()),
|
2015-06-01 05:45:03 +08:00
|
|
|
("setting", models.CharField(max_length=255)),
|
|
|
|
],
|
|
|
|
options=None,
|
|
|
|
bases=None,
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="Character",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-06-01 05:45:03 +08:00
|
|
|
("name", models.CharField(max_length=255)),
|
|
|
|
],
|
|
|
|
options=None,
|
|
|
|
bases=None,
|
2016-06-02 05:43:59 +08:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2017-02-11 20:16:35 +08:00
|
|
|
name="CITestModel",
|
2016-06-02 05:43:59 +08:00
|
|
|
fields=[
|
2017-02-11 20:16:35 +08:00
|
|
|
("name", CICharField(primary_key=True, max_length=255)),
|
|
|
|
("email", CIEmailField()),
|
|
|
|
("description", CITextField()),
|
2017-05-03 13:25:30 +08:00
|
|
|
("array_field", ArrayField(CITextField(), null=True)),
|
2016-06-02 05:43:59 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
|
|
|
bases=None,
|
2015-06-01 05:45:03 +08:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="Line",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-06-01 05:45:03 +08:00
|
|
|
(
|
|
|
|
"scene",
|
|
|
|
models.ForeignKey(
|
|
|
|
"postgres_tests.Scene", on_delete=models.SET_NULL
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-06-01 05:45:03 +08:00
|
|
|
(
|
|
|
|
"character",
|
|
|
|
models.ForeignKey(
|
|
|
|
"postgres_tests.Character", on_delete=models.SET_NULL
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
|
|
|
),
|
2015-06-01 05:45:03 +08:00
|
|
|
("dialogue", models.TextField(blank=True, null=True)),
|
|
|
|
("dialogue_search_vector", SearchVectorField(blank=True, null=True)),
|
|
|
|
(
|
|
|
|
"dialogue_config",
|
|
|
|
models.CharField(max_length=100, blank=True, null=True),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-06-01 05:45:03 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
|
|
|
bases=None,
|
|
|
|
),
|
2020-03-04 20:33:12 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="LineSavedSearch",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2020-03-04 20:33:12 +08:00
|
|
|
(
|
|
|
|
"line",
|
|
|
|
models.ForeignKey("postgres_tests.Line", on_delete=models.CASCADE),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2020-03-04 20:33:12 +08:00
|
|
|
("query", models.CharField(max_length=100)),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
|
|
|
),
|
2015-02-08 23:21:48 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="AggregateTestModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2017-05-06 22:56:28 +08:00
|
|
|
("boolean_field", models.BooleanField(null=True)),
|
2015-02-08 23:21:48 +08:00
|
|
|
("char_field", models.CharField(max_length=30, blank=True)),
|
2021-09-25 21:24:40 +08:00
|
|
|
("text_field", models.TextField(blank=True)),
|
2015-02-08 23:21:48 +08:00
|
|
|
("integer_field", models.IntegerField(null=True)),
|
2020-10-12 18:52:58 +08:00
|
|
|
("json_field", models.JSONField(null=True)),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
2015-02-08 23:21:48 +08:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="StatTestModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-02-08 23:21:48 +08:00
|
|
|
("int1", models.IntegerField()),
|
|
|
|
("int2", models.IntegerField()),
|
2015-07-22 22:43:21 +08:00
|
|
|
(
|
|
|
|
"related_field",
|
|
|
|
models.ForeignKey(
|
|
|
|
"postgres_tests.AggregateTestModel",
|
|
|
|
models.SET_NULL,
|
|
|
|
null=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2020-10-12 18:52:58 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
2015-02-08 23:21:48 +08:00
|
|
|
),
|
2015-06-02 01:00:34 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="NowTestModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-06-02 01:00:34 +08:00
|
|
|
("when", models.DateTimeField(null=True, default=None)),
|
|
|
|
],
|
2017-03-30 05:52:42 +08:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="UUIDTestModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2017-03-30 05:52:42 +08:00
|
|
|
("uuid", models.UUIDField(default=None, null=True)),
|
|
|
|
],
|
2015-06-02 01:00:34 +08:00
|
|
|
),
|
2015-01-11 00:14:20 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="RangesModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
("ints", IntegerRangeField(null=True, blank=True)),
|
|
|
|
("bigints", BigIntegerRangeField(null=True, blank=True)),
|
2018-10-03 07:17:23 +08:00
|
|
|
("decimals", DecimalRangeField(null=True, blank=True)),
|
2015-04-05 00:10:26 +08:00
|
|
|
("timestamps", DateTimeRangeField(null=True, blank=True)),
|
2019-07-10 16:33:36 +08:00
|
|
|
("timestamps_inner", DateTimeRangeField(null=True, blank=True)),
|
2021-06-18 05:13:49 +08:00
|
|
|
(
|
|
|
|
"timestamps_closed_bounds",
|
|
|
|
DateTimeRangeField(null=True, blank=True, default_bounds="[]"),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-04-05 00:10:26 +08:00
|
|
|
("dates", DateRangeField(null=True, blank=True)),
|
2019-07-10 16:33:36 +08:00
|
|
|
("dates_inner", DateRangeField(null=True, blank=True)),
|
2015-01-11 00:14:20 +08:00
|
|
|
],
|
2015-05-21 19:25:50 +08:00
|
|
|
options={"required_db_vendor": "postgresql"},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="RangeLookupsModel",
|
|
|
|
fields=[
|
2015-07-22 22:43:21 +08:00
|
|
|
(
|
|
|
|
"parent",
|
|
|
|
models.ForeignKey(
|
|
|
|
"postgres_tests.RangesModel",
|
|
|
|
models.SET_NULL,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-05-21 19:25:50 +08:00
|
|
|
("integer", models.IntegerField(blank=True, null=True)),
|
|
|
|
("big_integer", models.BigIntegerField(blank=True, null=True)),
|
|
|
|
("float", models.FloatField(blank=True, null=True)),
|
|
|
|
("timestamp", models.DateTimeField(blank=True, null=True)),
|
|
|
|
("date", models.DateField(blank=True, null=True)),
|
2019-12-05 16:54:27 +08:00
|
|
|
("small_integer", models.SmallIntegerField(blank=True, null=True)),
|
|
|
|
(
|
|
|
|
"decimal_field",
|
|
|
|
models.DecimalField(
|
|
|
|
max_digits=5, decimal_places=2, blank=True, null=True
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2015-05-21 19:25:50 +08:00
|
|
|
],
|
2015-01-11 00:14:20 +08:00
|
|
|
options={
|
2015-04-05 00:10:26 +08:00
|
|
|
"required_db_vendor": "postgresql",
|
2015-01-11 00:14:20 +08:00
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
2019-02-04 07:27:19 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="ArrayEnumModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2019-02-04 07:27:19 +08:00
|
|
|
(
|
|
|
|
"array_of_enums",
|
|
|
|
ArrayField(EnumField(max_length=20), null=True, blank=True),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2019-02-04 07:27:19 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
2019-07-12 19:08:00 +08:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="Room",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2019-07-12 19:08:00 +08:00
|
|
|
("number", models.IntegerField(unique=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="HotelReservation",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
2022-02-04 03:24:19 +08:00
|
|
|
),
|
2019-07-12 19:08:00 +08:00
|
|
|
("room", models.ForeignKey("postgres_tests.Room", models.CASCADE)),
|
|
|
|
("datespan", DateRangeField()),
|
|
|
|
("start", models.DateTimeField()),
|
|
|
|
("end", models.DateTimeField()),
|
|
|
|
("cancelled", models.BooleanField(default=False)),
|
2020-10-14 19:09:24 +08:00
|
|
|
("requirements", models.JSONField(blank=True, null=True)),
|
2019-07-12 19:08:00 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_vendor": "postgresql",
|
|
|
|
},
|
|
|
|
),
|
2015-05-31 05:13:58 +08:00
|
|
|
]
|