Add location x and y to address table

For easier reference
This commit is contained in:
Eli Ribble 2026-03-20 17:59:13 +00:00
parent 441e4d45b1
commit edfd8e285f
No known key found for this signature in database
3 changed files with 39 additions and 2 deletions

View file

@ -114,6 +114,24 @@ var Addresses = Table[
Generated: false,
AutoIncr: false,
},
LocationX: column{
Name: "location_x",
DBType: "double precision",
Default: "GENERATED",
Comment: "",
Nullable: true,
Generated: true,
AutoIncr: false,
},
LocationY: column{
Name: "location_y",
DBType: "double precision",
Default: "GENERATED",
Comment: "",
Nullable: true,
Generated: true,
AutoIncr: false,
},
},
Indexes: addressIndexes{
AddressPkey: index{
@ -172,11 +190,13 @@ type addressColumns struct {
Unit column
Region column
Number column
LocationX column
LocationY column
}
func (c addressColumns) AsSlice() []column {
return []column{
c.Country, c.Created, c.Location, c.H3cell, c.ID, c.Locality, c.PostalCode, c.Street, c.Unit, c.Region, c.Number,
c.Country, c.Created, c.Location, c.H3cell, c.ID, c.Locality, c.PostalCode, c.Street, c.Unit, c.Region, c.Number, c.LocationX, c.LocationY,
}
}