Remove now-extraneous latitude/longitude generated columns

Now that we can pull out the geometry directly into a go object we don't
need these and they complicate our insertions
This commit is contained in:
Eli Ribble 2026-05-07 16:38:42 +00:00
parent 34a136eba5
commit 7a361a330d
No known key found for this signature in database
40 changed files with 426 additions and 464 deletions

View file

@ -19,6 +19,7 @@ func AccountFromID(ctx context.Context, org_id string) (model.Account, error) {
}
func AccountInsert(ctx context.Context, txn bob.Tx, m *model.Account) (model.Account, error) {
statement := table.Account.INSERT(table.Account.AllColumns).
MODEL(m)
MODEL(m).
RETURNING(table.Account.AllColumns)
return db.ExecuteOneTxBob[model.Account](ctx, txn, statement)
}

View file

@ -12,7 +12,8 @@ import (
func OAuthTokenInsert(ctx context.Context, m *model.OAuthToken) (model.OAuthToken, error) {
statement := table.OAuthToken.INSERT(table.OAuthToken.MutableColumns).
MODEL(m)
MODEL(m).
RETURNING(table.OAuthToken.AllColumns)
return db.ExecuteOne[model.OAuthToken](ctx, statement)
}
func OAuthTokenInvalidate(ctx context.Context, id int64) error {

View file

@ -26,6 +26,7 @@ func ServiceFeatureFromURL(ctx context.Context, url string) (model.ServiceFeatur
}
func ServiceFeatureInsert(ctx context.Context, txn bob.Tx, m model.ServiceFeature) error {
statement := table.ServiceMap.INSERT(table.ServiceMap.MutableColumns).
MODEL(m)
MODEL(m).
RETURNING(table.ServiceFeature.AllColumns)
return db.ExecuteNoneTxBob(ctx, txn, statement)
}

View file

@ -26,6 +26,7 @@ func ServiceMapsFromAccountID(ctx context.Context, account_id string) ([]model.S
}
func ServiceMapInsert(ctx context.Context, txn bob.Tx, m *model.ServiceMap) error {
statement := table.ServiceMap.INSERT(table.ServiceMap.MutableColumns).
MODEL(m)
MODEL(m).
RETURNING(table.ServiceMap.AllColumns)
return db.ExecuteNoneTxBob(ctx, txn, statement)
}

View file

@ -17,6 +17,7 @@ func UserPrivilegesDeleteByUserID(ctx context.Context, txn bob.Tx, id string) er
}
func UserPrivilegeInsert(ctx context.Context, txn bob.Tx, m *model.UserPrivilege) error {
statement := table.UserPrivilege.INSERT(table.UserPrivilege.MutableColumns).
MODEL(m)
MODEL(m).
RETURNING(table.UserPrivilege.AllColumns)
return db.ExecuteNoneTxBob(ctx, txn, statement)
}