reversed the default geoPoint column props for consistency with the types.GeoPoint marshalization
This commit is contained in:
parent
bf9a7b1e3d
commit
aec4870acd
|
@ -103,7 +103,7 @@ func (f *GeoPointField) SetHidden(hidden bool) {
|
||||||
|
|
||||||
// ColumnType implements [Field.ColumnType] interface method.
|
// ColumnType implements [Field.ColumnType] interface method.
|
||||||
func (f *GeoPointField) ColumnType(app App) string {
|
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.
|
// PrepareValue implements [Field.PrepareValue] interface method.
|
||||||
|
|
|
@ -21,7 +21,7 @@ func TestGeoPointFieldColumnType(t *testing.T) {
|
||||||
|
|
||||||
f := &core.GeoPointField{}
|
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 {
|
if v := f.ColumnType(app); v != expected {
|
||||||
t.Fatalf("Expected\n%q\ngot\n%q", expected, v)
|
t.Fatalf("Expected\n%q\ngot\n%q", expected, v)
|
||||||
|
|
Loading…
Reference in New Issue