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.deptmaintenance ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Description ===== Records which staff members have manintenace rights in which department. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **departmentid** | char(2) | NOT NULL | | | | **staffid** | char(20) | NOT NULL | | | ===== Primary Key ===== * departmentid, staffid ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | department | departmentid | [[database:tables:pears_department|pears.Department (departmentid)]] | NOT NULL; | | staff | staffid | [[database:tables:pears_staff|pears.staff (staffid)]] | NOT NULL; | ===== 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"."deptmaintenance" -- Table comment: Records which staff members have manintenace rights in which department. -- Statement count: 4 CREATE TABLE "pears"."deptmaintenance" ( "departmentid" char(2) NOT NULL ,"staffid" char(20) NOT NULL ,PRIMARY KEY ("departmentid" ASC,"staffid" ASC) ) go COMMENT ON TABLE "pears"."deptmaintenance" IS 'Records which staff members have manintenace rights in which department.' go ALTER TABLE "pears"."deptmaintenance" ADD NOT NULL FOREIGN KEY "department" ("departmentid" ASC) REFERENCES "pears"."Department" ("departmentid") go ALTER TABLE "pears"."deptmaintenance" ADD NOT NULL FOREIGN KEY "staff" ("staffid" ASC) REFERENCES "pears"."staff" ("staffid") go </code> database/tables/pears_deptmaintenance.txt Last modified: 2026/08/07 19:24by 127.0.0.1