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 FieldseekerTreatments = Table[
Objectid: column{
Name: "objectid",
DBType: "bigint",
Default: "nextval('fieldseeker.treatment_objectid_seq'::regclass)",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
@ -553,7 +553,7 @@ var FieldseekerTreatments = Table[
Name: "treatment_pkey",
Columns: []indexColumn{
{
Name: "objectid",
Name: "globalid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
@ -573,7 +573,7 @@ var FieldseekerTreatments = Table[
},
PrimaryKey: &constraint{
Name: "treatment_pkey",
Columns: []string{"objectid", "version"},
Columns: []string{"globalid", "version"},
Comment: "",
},
ForeignKeys: fieldseekerTreatmentForeignKeys{