Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.StaffHistory ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Columns ===== ^ 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 | | ===== Primary Key ===== * StaffHistoryID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | Person | PersonID | [[database:tables:pears_person|pears.Person (personid)]] | ON DELETE CASCADE | | Company | CompanyID | [[database:tables:pears_company|pears.Company (companyid)]] | ON DELETE CASCADE | | Placement | PlacementID | [[database:tables:pears_placement|pears.Placement (placementid)]] | ON DELETE CASCADE | | Vacancy | VacancyID | [[database:tables:pears_vacancy|pears.vacancy (vacancyid)]] | ON DELETE CASCADE | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== * No triggers found. ===== Original SQL ===== <code sql> -- 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 </code> database/tables/pears_staffhistory.txt Last modified: 2026/08/07 19:24by 127.0.0.1