Skip to content

Commit

Permalink
Rename geometry field
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Jan 10, 2025
1 parent 7940785 commit e0d8038
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.4 on 2025-01-10 09:52
# Generated by Django 5.1.4 on 2025-01-10 10:06

import mptt.fields

Expand Down Expand Up @@ -26,7 +26,7 @@ class Migration(migrations.Migration):
("name", models.CharField(max_length=128)),
("level", models.IntegerField()),
("path", models.CharField(max_length=768)),
("simplified_geometry", models.JSONField(null=True)),
("geometry", models.JSONField(null=True)),
("lft", models.PositiveIntegerField(editable=False)),
("rght", models.PositiveIntegerField(editable=False)),
("tree_id", models.PositiveIntegerField(db_index=True, editable=False)),
Expand Down
5 changes: 1 addition & 4 deletions temba/locations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ class Location(MPTTModel, models.Model):
level = models.IntegerField()
parent = TreeForeignKey("self", null=True, on_delete=models.PROTECT, related_name="children", db_index=True)
path = models.CharField(max_length=768) # e.g. Rwanda > Kigali
simplified_geometry = models.JSONField(null=True)

objects = NoGeometryManager()
geometries = GeometryManager()
geometry = models.JSONField(null=True)

class Meta:
indexes = [models.Index(Lower("name"), name="locations_by_name")]
Expand Down
2 changes: 1 addition & 1 deletion temba/orgs/migrations/0165_org_location.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.4 on 2025-01-10 09:52
# Generated by Django 5.1.4 on 2025-01-10 10:06

import django.db.models.deletion
from django.db import migrations, models
Expand Down

0 comments on commit e0d8038

Please sign in to comment.