2020-04-10 20:30:25 +00:00
|
|
|
from django.contrib.gis.db import models
|
|
|
|
from django.db import migrations
|
|
|
|
from django.db.models import deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
|
|
("rasterapp", "0001_setup_extensions"),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="RasterModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
2022-02-03 19:24:19 +00:00
|
|
|
),
|
2020-04-10 20:30:25 +00:00
|
|
|
(
|
|
|
|
"rast",
|
|
|
|
models.fields.RasterField(
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
srid=4326,
|
|
|
|
verbose_name="A Verbose Raster Name",
|
|
|
|
),
|
2022-02-03 19:24:19 +00:00
|
|
|
),
|
2020-04-10 20:30:25 +00:00
|
|
|
(
|
|
|
|
"rastprojected",
|
|
|
|
models.fields.RasterField(
|
|
|
|
null=True,
|
|
|
|
srid=3086,
|
|
|
|
verbose_name="A Projected Raster Table",
|
|
|
|
),
|
2022-02-03 19:24:19 +00:00
|
|
|
),
|
2020-04-10 20:30:25 +00:00
|
|
|
("geom", models.fields.PointField(null=True, srid=4326)),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_features": ["supports_raster"],
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="RasterRelatedModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
2022-02-03 19:24:19 +00:00
|
|
|
),
|
2020-04-10 20:30:25 +00:00
|
|
|
(
|
|
|
|
"rastermodel",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=deletion.CASCADE,
|
|
|
|
to="rasterapp.rastermodel",
|
|
|
|
),
|
2022-02-03 19:24:19 +00:00
|
|
|
),
|
2020-04-10 20:30:25 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
"required_db_features": ["supports_raster"],
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|