pears.StaffHistory

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

Column Type Null Default Comment
StaffHistoryID char(20) NOT NULL
PersonID char(20) NULL
CompanyID char(20) NULL
PlacementID char(20) NULL
VacancyID char(20) NULL
OldStaff char(20) NULL
NewStaff char(20) NULL
WhoEntered char(20) NULL
WhenEntered timestamp NOT NULL current timestamp
  • StaffHistoryID
Constraint Columns References Delete/update action
Person PersonID pears.Person (personid) ON DELETE CASCADE
Company CompanyID pears.Company (companyid) ON DELETE CASCADE
Placement PlacementID pears.Placement (placementid) ON DELETE CASCADE
Vacancy VacancyID pears.vacancy (vacancyid) 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"."StaffHistory"
-- Table comment: 
-- Statement count: 5
 
CREATE TABLE "pears"."StaffHistory" (
    "StaffHistoryID"                 CHAR(20) NOT NULL
   ,"PersonID"                       CHAR(20) NULL
   ,"CompanyID"                      CHAR(20) NULL
   ,"PlacementID"                    CHAR(20) NULL
   ,"VacancyID"                      CHAR(20) NULL
   ,"OldStaff"                       CHAR(20) NULL
   ,"NewStaff"                       CHAR(20) NULL
   ,"WhoEntered"                     CHAR(20) NULL
   ,"WhenEntered"                    TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP
   ,PRIMARY KEY ("StaffHistoryID" ASC) 
)
GO
 
 
ALTER TABLE "pears"."StaffHistory"
    ADD FOREIGN KEY "Person" ("PersonID" ASC)
    REFERENCES "pears"."Person" ("personid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."StaffHistory"
    ADD FOREIGN KEY "Company" ("CompanyID" ASC)
    REFERENCES "pears"."Company" ("companyid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."StaffHistory"
    ADD FOREIGN KEY "Placement" ("PlacementID" ASC)
    REFERENCES "pears"."Placement" ("placementid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."StaffHistory"
    ADD FOREIGN KEY "Vacancy" ("VacancyID" ASC)
    REFERENCES "pears"."vacancy" ("vacancyid")
    ON DELETE CASCADE
GO
  • database/tables/pears_staffhistory.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1