Remove old FieldSeeker tables, use v2 generated tables.
This requires a bunch of changes since the types on these tables are much closer to the underlying types of the Fieldseeker data we are getting back from the API. I now need to use proper UUID types everywhere, which means I had to modify the bob gen config to consistently use google UUID, my UUID library of choice. I also had to add the organization_id to all the fieldseeker tables since we rely on them existing for some of our compound queries. There were some changes to the API type signatures to get things to build. I may yet regret those.
This commit is contained in:
parent
58f5afccc9
commit
1395e3d3ac
445 changed files with 54077 additions and 275856 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.0.3-0.20251202003046-49148fc66a73+dirty. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.0.4-0.20251216163753-8e325b7c773a+dirty. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package dbinfo
|
||||
|
|
@ -28,7 +28,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "trapdata_id",
|
||||
DBType: "uuid",
|
||||
Default: "NULL",
|
||||
Comment: "Trap Data ID",
|
||||
Comment: "Original attribute from ArcGIS API is TRAPDATA_ID",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -37,7 +37,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "pool_id",
|
||||
DBType: "uuid",
|
||||
Default: "NULL",
|
||||
Comment: "Pool ID",
|
||||
Comment: "Original attribute from ArcGIS API is POOL_ID",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -46,7 +46,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "species",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Species",
|
||||
Comment: "Original attribute from ArcGIS API is SPECIES",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -55,7 +55,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "females",
|
||||
DBType: "smallint",
|
||||
Default: "NULL",
|
||||
Comment: "Females",
|
||||
Comment: "Original attribute from ArcGIS API is FEMALES",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -64,7 +64,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "globalid",
|
||||
DBType: "uuid",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is GlobalID",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -73,7 +73,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "created_user",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is created_user",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -82,7 +82,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "created_date",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is created_date",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -91,7 +91,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "last_edited_user",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is last_edited_user",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -100,7 +100,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "last_edited_date",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is last_edited_date",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -109,7 +109,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "creationdate",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is CreationDate",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -118,7 +118,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "creator",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is Creator",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -127,7 +127,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "editdate",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is EditDate",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -136,6 +136,24 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "editor",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Original attribute from ArcGIS API is Editor",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Geometry: column{
|
||||
Name: "geometry",
|
||||
DBType: "jsonb",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Geospatial: column{
|
||||
Name: "geospatial",
|
||||
DBType: "geometry",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
|
|
@ -145,7 +163,16 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "version",
|
||||
DBType: "integer",
|
||||
Default: "1",
|
||||
Comment: "Tracks version changes to the row. Increases when data is modified.",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
OrganizationID: column{
|
||||
Name: "organization_id",
|
||||
DBType: "integer",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -180,6 +207,17 @@ var FieldseekerPooldetails = Table[
|
|||
Columns: []string{"objectid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerPooldetailForeignKeys{
|
||||
FieldseekerPooldetailPooldetailOrganizationIDFkey: foreignKey{
|
||||
constraint: constraint{
|
||||
Name: "fieldseeker.pooldetail.pooldetail_organization_id_fkey",
|
||||
Columns: []string{"organization_id"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignTable: "organization",
|
||||
ForeignColumns: []string{"id"},
|
||||
},
|
||||
},
|
||||
|
||||
Comment: "",
|
||||
}
|
||||
|
|
@ -199,12 +237,15 @@ type fieldseekerPooldetailColumns struct {
|
|||
Creator column
|
||||
Editdate column
|
||||
Editor column
|
||||
Geometry column
|
||||
Geospatial column
|
||||
Version column
|
||||
OrganizationID column
|
||||
}
|
||||
|
||||
func (c fieldseekerPooldetailColumns) AsSlice() []column {
|
||||
return []column{
|
||||
c.Objectid, c.TrapdataID, c.PoolID, c.Species, c.Females, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Version,
|
||||
c.Objectid, c.TrapdataID, c.PoolID, c.Species, c.Females, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Geometry, c.Geospatial, c.Version, c.OrganizationID,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -218,10 +259,14 @@ func (i fieldseekerPooldetailIndexes) AsSlice() []index {
|
|||
}
|
||||
}
|
||||
|
||||
type fieldseekerPooldetailForeignKeys struct{}
|
||||
type fieldseekerPooldetailForeignKeys struct {
|
||||
FieldseekerPooldetailPooldetailOrganizationIDFkey foreignKey
|
||||
}
|
||||
|
||||
func (f fieldseekerPooldetailForeignKeys) AsSlice() []foreignKey {
|
||||
return []foreignKey{}
|
||||
return []foreignKey{
|
||||
f.FieldseekerPooldetailPooldetailOrganizationIDFkey,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerPooldetailUniques struct{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue