====== pears.PlacementRole ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Capacities in which Staff records are related to a Placement
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **PlacementRoleID** | char(20) | NOT NULL | | |
| Description | char(50) | NULL | | |
| DepartmentID | char(2) | NULL | | |
| SortOrder | smallint | NULL | | |
===== Primary Key =====
* PlacementRoleID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| department | DepartmentID | [[database:tables:pears_department|pears.Department (departmentid)]] | ON DELETE SET NULL |
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_placement|pears.Placement]] | PlacementRole | PlacementRoleID | PlacementRoleID |
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."PlacementRole"
-- Table comment: Capacities in which Staff records are related to a Placement
-- Statement count: 3
CREATE TABLE "pears"."PlacementRole" (
"PlacementRoleID" char(20) NOT NULL
,"Description" char(50) NULL
,"DepartmentID" char(2) NULL
,"SortOrder" smallint NULL
,PRIMARY KEY ("PlacementRoleID" ASC)
)
go
COMMENT ON TABLE "pears"."PlacementRole" IS
'Capacities in which Staff records are related to a Placement'
go
ALTER TABLE "pears"."PlacementRole"
ADD FOREIGN KEY "department" ("DepartmentID" ASC)
REFERENCES "pears"."Department" ("departmentid")
ON DELETE SET NULL
go