summaryrefslogtreecommitdiff
path: root/ishtar_common/migrations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-01-09 15:20:00 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-02-05 10:56:44 +0100
commit21c1df6c555b275ea6fde1ba936baf18d419b237 (patch)
treed44ec2a3686a961f1728ad1e4e86db79dd71da6a /ishtar_common/migrations
parent61e981d30af776e6a64394b56110063e86f0bab0 (diff)
downloadIshtar-21c1df6c555b275ea6fde1ba936baf18d419b237.tar.bz2
Ishtar-21c1df6c555b275ea6fde1ba936baf18d419b237.zip
🏷️ add default data types for geo origin and buffer
Diffstat (limited to 'ishtar_common/migrations')
-rw-r--r--ishtar_common/migrations/0235_default_geo_types.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/ishtar_common/migrations/0235_default_geo_types.py b/ishtar_common/migrations/0235_default_geo_types.py
new file mode 100644
index 000000000..2177f351a
--- /dev/null
+++ b/ishtar_common/migrations/0235_default_geo_types.py
@@ -0,0 +1,43 @@
+# Generated by Django 2.2.24 on 2024-01-09 14:57
+
+from django.db import migrations
+
+
+def create_data(apps, __):
+ GeoOriginType = apps.get_model("ishtar_common", "GeoOriginType")
+ GeoOriginType.objects.get_or_create(
+ txt_idx="releve-topographique",
+ defaults={"label": "Relevé topographique", "available": True, "order": 10}
+ )
+ GeoOriginType.objects.get_or_create(
+ txt_idx="releve-gps",
+ defaults={"label": "Relevé GPS", "available": True, "order": 20}
+ )
+ GeoOriginType.objects.get_or_create(
+ txt_idx="vectorisation-de-photographie-aerienne",
+ defaults={"label": "Vectorisation de photographie aérienne", "available": True, "order": 30}
+ )
+ GeoOriginType.objects.get_or_create(
+ txt_idx="vectorisation-de-carte-ancienne",
+ defaults={"label": "Vectorisation de carte ancienne", "available": True, "order": 40}
+ )
+ GeoBufferType = apps.get_model("ishtar_common", "GeoBufferType")
+ GeoBufferType.objects.get_or_create(
+ txt_idx="incertitude",
+ defaults={"label": "Incertitude", "available": True, "order": 10}
+ )
+ GeoBufferType.objects.get_or_create(
+ txt_idx="rayon-de-collecte",
+ defaults={"label": "Rayon de collecte", "available": True, "order": 20}
+ )
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('ishtar_common', '0234_gdprlog_gdprperson'),
+ ]
+
+ operations = [
+ migrations.RunPython(create_data)
+ ]