pears.IQXNetCandidateShifts

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Populated by the “PopulateCandidateShifts” process — stores which “TempShiftPlan” shifts are available and eligible for each candidate to book. Acts as a security gate: a candidate cannot book a shift unless a matching row exists in this table. The populate process applies filtering rules (availability, grade, requirements etc.) defined in “IQXNetBehaviour” before inserting rows.

Column Type Null Default Comment
PersonID char(20) NOT NULL FK → Person — the eligible candidate
TempShiftPlanID char(20) NOT NULL FK → TempShiftPlan — the shift on offer
Matched char(1) NULL
  • PersonID, TempShiftPlanID
Constraint Columns References Delete/update action
Person PersonID pears.Person (personid) NOT NULL; ON DELETE CASCADE
TempShiftPlan TempShiftPlanID pears.TempShiftPlan (TempShiftPlanID) NOT NULL; ON DELETE CASCADE
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."IQXNetCandidateShifts"
-- Table comment: Populated by the "PopulateCandidateShifts" process — stores which "TempShiftPlan" shifts are available and eligible for each candidate to book. Acts as a security gate: a candidate cannot book a shift unless a matching row exists in this table. The populate process applies filtering rules (availability, grade, requirements etc.) defined in "IQXNetBehaviour" before inserting rows.
-- Statement count: 6
 
CREATE TABLE "pears"."IQXNetCandidateShifts" (
    "PersonID"                       CHAR(20) NOT NULL
   ,"TempShiftPlanID"                CHAR(20) NOT NULL
   ,"Matched"                        CHAR(1) NULL
   ,PRIMARY KEY ("PersonID" ASC,"TempShiftPlanID" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."IQXNetCandidateShifts"."PersonID" IS 
	'FK → Person — the eligible candidate'
GO
 
 
COMMENT ON COLUMN "pears"."IQXNetCandidateShifts"."TempShiftPlanID" IS 
	'FK → TempShiftPlan — the shift on offer'
GO
 
 
COMMENT ON TABLE "pears"."IQXNetCandidateShifts" IS 
	'Populated by the "PopulateCandidateShifts" process — stores which "TempShiftPlan" shifts are available and eligible for each candidate to book. Acts as a security gate: a candidate cannot book a shift unless a matching row exists in this table. The populate process applies filtering rules (availability, grade, requirements etc.) defined in "IQXNetBehaviour" before inserting rows.'
GO
 
 
ALTER TABLE "pears"."IQXNetCandidateShifts"
    ADD NOT NULL FOREIGN KEY "Person" ("PersonID" ASC)
    REFERENCES "pears"."Person" ("personid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."IQXNetCandidateShifts"
    ADD NOT NULL FOREIGN KEY "TempShiftPlan" ("TempShiftPlanID" ASC)
    REFERENCES "pears"."TempShiftPlan" ("TempShiftPlanID")
    ON DELETE CASCADE
GO
  • database/tables/pears_iqxnetcandidateshifts.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1