====== pears.VacancyLimit ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Spending Limits for Vacancies
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **VacancyLimitID** | char(20) | NOT NULL | | |
| VacancyID | char(20) | NULL | | |
| ShiftTemplateGroupID | char(20) | NULL | | |
| Description | char(20) | NULL | | |
| Target | integer | NULL | | |
| Limit | double | NULL | | |
===== Primary Key =====
* VacancyLimitID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| vacancy | VacancyID | [[database:tables:pears_vacancy|pears.vacancy (vacancyid)]] | ON DELETE CASCADE |
| ShiftTemplateGroup | ShiftTemplateGroupID | [[database:tables:pears_shifttemplategroup|pears.ShiftTemplateGroup (ShiftTemplateGroupID)]] | |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."VacancyLimit"
-- Table comment: Spending Limits for Vacancies
-- Statement count: 4
CREATE TABLE "pears"."VacancyLimit" (
"VacancyLimitID" char(20) NOT NULL
,"VacancyID" char(20) NULL
,"ShiftTemplateGroupID" char(20) NULL
,"Description" char(20) NULL
,"Target" integer NULL
,"Limit" double NULL
,PRIMARY KEY ("VacancyLimitID" ASC)
)
go
COMMENT ON TABLE "pears"."VacancyLimit" IS
'Spending Limits for Vacancies'
go
ALTER TABLE "pears"."VacancyLimit"
ADD FOREIGN KEY "vacancy" ("VacancyID" ASC)
REFERENCES "pears"."vacancy" ("vacancyid")
ON DELETE CASCADE
go
ALTER TABLE "pears"."VacancyLimit"
ADD FOREIGN KEY "ShiftTemplateGroup" ("ShiftTemplateGroupID" ASC)
REFERENCES "pears"."ShiftTemplateGroup" ("ShiftTemplateGroupID")
go