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 FieldseekerRodentlocations = Table[
|
|||
Name: "locationname",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Location Name",
|
||||
Comment: "Original attribute from ArcGIS API is LOCATIONNAME",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -37,7 +37,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "zone",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is ZONE",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -46,43 +46,43 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "zone2",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is ZONE2",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Habitat: column{
|
||||
Name: "habitat",
|
||||
DBType: "fieldseeker.rodentlocation_rodentlocationhabitat_enum",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is HABITAT",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Priority: column{
|
||||
Name: "priority",
|
||||
DBType: "fieldseeker.rodentlocation_locationpriority_1_enum",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is PRIORITY",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Usetype: column{
|
||||
Name: "usetype",
|
||||
DBType: "fieldseeker.rodentlocation_locationusetype_1_enum",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is USETYPE",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Active: column{
|
||||
Name: "active",
|
||||
DBType: "fieldseeker.rodentlocation_notinuit_f_1_enum",
|
||||
DBType: "smallint",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is ACTIVE",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -91,7 +91,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "description",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is DESCRIPTION",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -100,7 +100,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "accessdesc",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is ACCESSDESC",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -109,16 +109,16 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "comments",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is COMMENTS",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Symbology: column{
|
||||
Name: "symbology",
|
||||
DBType: "fieldseeker.rodentlocation_rodentlocation_symbology_enum",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is SYMBOLOGY",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -127,7 +127,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "externalid",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "External ID",
|
||||
Comment: "Original attribute from ArcGIS API is EXTERNALID",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -136,7 +136,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "nextactiondatescheduled",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is NEXTACTIONDATESCHEDULED",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -145,7 +145,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "locationnumber",
|
||||
DBType: "integer",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is LOCATIONNUMBER",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -154,7 +154,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "lastinspectdate",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "Last Inspection Date",
|
||||
Comment: "Original attribute from ArcGIS API is LASTINSPECTDATE",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -163,7 +163,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "lastinspectspecies",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Last Inspection Species",
|
||||
Comment: "Original attribute from ArcGIS API is LASTINSPECTSPECIES",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -172,7 +172,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "lastinspectaction",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Last Inspection Action",
|
||||
Comment: "Original attribute from ArcGIS API is LASTINSPECTACTION",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -181,7 +181,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "lastinspectconditions",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Last Inspection Conditions",
|
||||
Comment: "Original attribute from ArcGIS API is LASTINSPECTCONDITIONS",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -190,7 +190,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "lastinspectrodentevidence",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Last Inspection Rodent Evidence",
|
||||
Comment: "Original attribute from ArcGIS API is LASTINSPECTRODENTEVIDENCE",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -199,7 +199,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "globalid",
|
||||
DBType: "uuid",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is GlobalID",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -208,7 +208,7 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -217,7 +217,7 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -226,7 +226,7 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -235,7 +235,7 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -244,7 +244,7 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -253,7 +253,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "creator",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is Creator",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -262,7 +262,7 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -271,7 +271,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "editor",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Comment: "Original attribute from ArcGIS API is Editor",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
|
|
@ -280,7 +280,25 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "jurisdiction",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "Jurisdiction",
|
||||
Comment: "Original attribute from ArcGIS API is JURISDICTION",
|
||||
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,
|
||||
AutoIncr: false,
|
||||
|
|
@ -289,7 +307,16 @@ var FieldseekerRodentlocations = 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,
|
||||
|
|
@ -324,6 +351,17 @@ var FieldseekerRodentlocations = Table[
|
|||
Columns: []string{"objectid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerRodentlocationForeignKeys{
|
||||
FieldseekerRodentlocationRodentlocationOrganizationIDFkey: foreignKey{
|
||||
constraint: constraint{
|
||||
Name: "fieldseeker.rodentlocation.rodentlocation_organization_id_fkey",
|
||||
Columns: []string{"organization_id"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignTable: "organization",
|
||||
ForeignColumns: []string{"id"},
|
||||
},
|
||||
},
|
||||
|
||||
Comment: "",
|
||||
}
|
||||
|
|
@ -359,12 +397,15 @@ type fieldseekerRodentlocationColumns struct {
|
|||
Editdate column
|
||||
Editor column
|
||||
Jurisdiction column
|
||||
Geometry column
|
||||
Geospatial column
|
||||
Version column
|
||||
OrganizationID column
|
||||
}
|
||||
|
||||
func (c fieldseekerRodentlocationColumns) AsSlice() []column {
|
||||
return []column{
|
||||
c.Objectid, c.Locationname, c.Zone, c.Zone2, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Nextactiondatescheduled, c.Locationnumber, c.Lastinspectdate, c.Lastinspectspecies, c.Lastinspectaction, c.Lastinspectconditions, c.Lastinspectrodentevidence, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.Version,
|
||||
c.Objectid, c.Locationname, c.Zone, c.Zone2, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Nextactiondatescheduled, c.Locationnumber, c.Lastinspectdate, c.Lastinspectspecies, c.Lastinspectaction, c.Lastinspectconditions, c.Lastinspectrodentevidence, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.Geometry, c.Geospatial, c.Version, c.OrganizationID,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -378,10 +419,14 @@ func (i fieldseekerRodentlocationIndexes) AsSlice() []index {
|
|||
}
|
||||
}
|
||||
|
||||
type fieldseekerRodentlocationForeignKeys struct{}
|
||||
type fieldseekerRodentlocationForeignKeys struct {
|
||||
FieldseekerRodentlocationRodentlocationOrganizationIDFkey foreignKey
|
||||
}
|
||||
|
||||
func (f fieldseekerRodentlocationForeignKeys) AsSlice() []foreignKey {
|
||||
return []foreignKey{}
|
||||
return []foreignKey{
|
||||
f.FieldseekerRodentlocationRodentlocationOrganizationIDFkey,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerRodentlocationUniques struct{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue