pears.VacancyRoleAllocation

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

Link table between VacancyRole - Vacancies and Staff

Column Type Null Default Comment
VacancyID char(20) NOT NULL
EmploymentID char(20) NOT NULL
VacancyRoleID char(20) NOT NULL
  • VacancyID, EmploymentID, VacancyRoleID
Constraint Columns References Delete/update action
employment EmploymentID pears.employment (employmentid) NOT NULL; ON DELETE CASCADE
vacancy VacancyID pears.vacancy (vacancyid) NOT NULL; ON DELETE CASCADE
VacancyRole VacancyRoleID pears.VacancyRole (VacancyRoleID) 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"."VacancyRoleAllocation"
-- Table comment: Link table between VacancyRole - Vacancies and Staff
-- Statement count: 5
 
CREATE TABLE "pears"."VacancyRoleAllocation" (
    "VacancyID"                      CHAR(20) NOT NULL
   ,"EmploymentID"                   CHAR(20) NOT NULL
   ,"VacancyRoleID"                  CHAR(20) NOT NULL
   ,PRIMARY KEY ("VacancyID" ASC,"EmploymentID" ASC,"VacancyRoleID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."VacancyRoleAllocation" IS 
	'Link table between VacancyRole - Vacancies and Staff'
GO
 
 
ALTER TABLE "pears"."VacancyRoleAllocation"
    ADD NOT NULL FOREIGN KEY "employment" ("EmploymentID" ASC)
    REFERENCES "pears"."employment" ("employmentid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."VacancyRoleAllocation"
    ADD NOT NULL FOREIGN KEY "vacancy" ("VacancyID" ASC)
    REFERENCES "pears"."vacancy" ("vacancyid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."VacancyRoleAllocation"
    ADD NOT NULL FOREIGN KEY "VacancyRole" ("VacancyRoleID" ASC)
    REFERENCES "pears"."VacancyRole" ("VacancyRoleID")
    ON DELETE CASCADE
GO
  • database/tables/pears_vacancyroleallocation.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1