From aec4870acd1a7c6564266bb08f046fefa722093b Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Tue, 15 Apr 2025 21:08:38 +0300 Subject: [PATCH] reversed the default geoPoint column props for consistency with the types.GeoPoint marshalization --- core/field_geo_point.go | 2 +- core/field_geo_point_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/field_geo_point.go b/core/field_geo_point.go index 59eb7a81..eecc4186 100644 --- a/core/field_geo_point.go +++ b/core/field_geo_point.go @@ -103,7 +103,7 @@ func (f *GeoPointField) SetHidden(hidden bool) { // ColumnType implements [Field.ColumnType] interface method. func (f *GeoPointField) ColumnType(app App) string { - return `JSON DEFAULT '{"lat":0,"lon":0}' NOT NULL` + return `JSON DEFAULT '{"lon":0,"lat":0}' NOT NULL` } // PrepareValue implements [Field.PrepareValue] interface method. diff --git a/core/field_geo_point_test.go b/core/field_geo_point_test.go index 93223e47..dfee422f 100644 --- a/core/field_geo_point_test.go +++ b/core/field_geo_point_test.go @@ -21,7 +21,7 @@ func TestGeoPointFieldColumnType(t *testing.T) { f := &core.GeoPointField{} - expected := `JSON DEFAULT '{"lat":0,"lon":0}' NOT NULL` + expected := `JSON DEFAULT '{"lon":0,"lat":0}' NOT NULL` if v := f.ColumnType(app); v != expected { t.Fatalf("Expected\n%q\ngot\n%q", expected, v)