2021-10-15 14:33:13 +13:00
|
|
|
# Generated by Django 3.2.8 on 2021-10-15 01:23
|
2021-10-07 08:59:57 +13:00
|
|
|
|
2021-10-15 14:33:13 +13:00
|
|
|
import django.contrib.gis.db.models.fields
|
2021-10-07 08:59:57 +13:00
|
|
|
from django.db import migrations, models
|
2021-10-15 14:33:13 +13:00
|
|
|
import django.db.models.deletion
|
2021-10-07 08:59:57 +13:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
2021-10-15 14:33:13 +13:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='EcologicalRegion',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('name', models.CharField(max_length=50, unique=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='SoilOrder',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('code', models.CharField(max_length=1, unique=True)),
|
|
|
|
('name', models.CharField(max_length=50, unique=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='SoilVariant',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('name', models.CharField(max_length=10, unique=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='ToleranceLevel',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('level', models.CharField(max_length=1)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='SoilLayer',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('nzsc_class', models.CharField(max_length=4)),
|
|
|
|
('nzsc_group', models.CharField(max_length=2)),
|
|
|
|
('shape_leng', models.FloatField()),
|
|
|
|
('geom', django.contrib.gis.db.models.fields.PolygonField(srid=2193)),
|
|
|
|
('nzsc_order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.soilorder')),
|
|
|
|
],
|
|
|
|
),
|
2021-10-07 08:59:57 +13:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Plant',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2021-10-15 14:33:13 +13:00
|
|
|
('name', models.CharField(max_length=50, unique=True)),
|
|
|
|
('commonname', models.CharField(blank=True, max_length=50, null=True)),
|
|
|
|
('maxheight', models.FloatField()),
|
|
|
|
('spacing', models.FloatField()),
|
|
|
|
('synonym', models.CharField(blank=True, max_length=200, null=True)),
|
|
|
|
('purpose', models.TextField(blank=True, null=True)),
|
|
|
|
('stage', models.PositiveIntegerField()),
|
|
|
|
('growth_form', models.CharField(blank=True, max_length=50, null=True)),
|
|
|
|
('drought_tolerance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='drought_tolerance', to='api.tolerancelevel')),
|
|
|
|
('ecological_regions', models.ManyToManyField(to='api.EcologicalRegion')),
|
|
|
|
('frost_tolerance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='frost_tolerance', to='api.tolerancelevel')),
|
|
|
|
('salinity_tolerance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='salinity_tolerance', to='api.tolerancelevel')),
|
|
|
|
('soil_order', models.ManyToManyField(to='api.SoilOrder')),
|
|
|
|
('soil_variants', models.ManyToManyField(to='api.SoilVariant')),
|
|
|
|
('water_tolerance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='water_tolerance', to='api.tolerancelevel')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='EcologicalDistrictLayer',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('ecological', models.CharField(max_length=5)),
|
|
|
|
('ecologic_1', models.CharField(max_length=50)),
|
|
|
|
('shape_leng', models.FloatField()),
|
|
|
|
('shape_area', models.FloatField()),
|
|
|
|
('geom', django.contrib.gis.db.models.fields.PolygonField(srid=2193)),
|
|
|
|
('ecologic_2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.ecologicalregion')),
|
2021-10-07 08:59:57 +13:00
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|