nidus-sync/db/dbinfo/fieldseeker_sync.bob.go
Eli Ribble 1395e3d3ac 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.
2025-12-24 17:58:08 -07:00

157 lines
3.5 KiB
Go

// 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
import "github.com/aarondl/opt/null"
var FieldseekerSyncs = Table[
fieldseekerSyncColumns,
fieldseekerSyncIndexes,
fieldseekerSyncForeignKeys,
fieldseekerSyncUniques,
fieldseekerSyncChecks,
]{
Schema: "",
Name: "fieldseeker_sync",
Columns: fieldseekerSyncColumns{
ID: column{
Name: "id",
DBType: "integer",
Default: "nextval('fieldseeker_sync_id_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Created: column{
Name: "created",
DBType: "timestamp without time zone",
Default: "CURRENT_TIMESTAMP",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
RecordsCreated: column{
Name: "records_created",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
RecordsUpdated: column{
Name: "records_updated",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
RecordsUnchanged: column{
Name: "records_unchanged",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
OrganizationID: column{
Name: "organization_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
},
Indexes: fieldseekerSyncIndexes{
FieldseekerSyncPkey: index{
Type: "btree",
Name: "fieldseeker_sync_pkey",
Columns: []indexColumn{
{
Name: "id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "fieldseeker_sync_pkey",
Columns: []string{"id"},
Comment: "",
},
ForeignKeys: fieldseekerSyncForeignKeys{
FieldseekerSyncFieldseekerSyncOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "fieldseeker_sync.fieldseeker_sync_organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
},
Comment: "",
}
type fieldseekerSyncColumns struct {
ID column
Created column
RecordsCreated column
RecordsUpdated column
RecordsUnchanged column
OrganizationID column
}
func (c fieldseekerSyncColumns) AsSlice() []column {
return []column{
c.ID, c.Created, c.RecordsCreated, c.RecordsUpdated, c.RecordsUnchanged, c.OrganizationID,
}
}
type fieldseekerSyncIndexes struct {
FieldseekerSyncPkey index
}
func (i fieldseekerSyncIndexes) AsSlice() []index {
return []index{
i.FieldseekerSyncPkey,
}
}
type fieldseekerSyncForeignKeys struct {
FieldseekerSyncFieldseekerSyncOrganizationIDFkey foreignKey
}
func (f fieldseekerSyncForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.FieldseekerSyncFieldseekerSyncOrganizationIDFkey,
}
}
type fieldseekerSyncUniques struct{}
func (u fieldseekerSyncUniques) AsSlice() []constraint {
return []constraint{}
}
type fieldseekerSyncChecks struct{}
func (c fieldseekerSyncChecks) AsSlice() []check {
return []check{}
}