Make fieldseeker tables key on globalid, version

This is because the objectid is not unique between organizations.
This commit is contained in:
Eli Ribble 2026-01-13 04:16:24 +00:00
parent d02d34cbaa
commit e18ce6a09e
No known key found for this signature in database
110 changed files with 10602 additions and 486 deletions

View file

@ -18,7 +18,7 @@ var FieldseekerFieldscoutinglogs = Table[
Objectid: column{
Name: "objectid",
DBType: "bigint",
Default: "nextval('fieldseeker.fieldscoutinglog_objectid_seq'::regclass)",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
@ -157,7 +157,7 @@ var FieldseekerFieldscoutinglogs = Table[
Name: "fieldscoutinglog_pkey",
Columns: []indexColumn{
{
Name: "objectid",
Name: "globalid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
@ -177,7 +177,7 @@ var FieldseekerFieldscoutinglogs = Table[
},
PrimaryKey: &constraint{
Name: "fieldscoutinglog_pkey",
Columns: []string{"objectid", "version"},
Columns: []string{"globalid", "version"},
Comment: "",
},
ForeignKeys: fieldseekerFieldscoutinglogForeignKeys{