====== pears.AutoMatchDivisionConfig ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
For use by Auto-matching procedures
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **AutoMatchDivisionConfigID** | char(20) | NOT NULL | | |
| DivisionID | char(20) | NULL | | |
| LeadTime | integer | NOT NULL | | in hours |
| EscalationDelay | integer | NOT NULL | | in mins |
| Email | tinyint | NULL | | ContactMethod |
| SMS | tinyint | NULL | | ContactMethod |
| Push | tinyint | NULL | | ContactMethod |
| QtyWorkers | integer | NULL | | |
| PercentNew | integer | NOT NULL | | 0 - 100 |
| Urgency | smallint | NULL | | null means all |
===== Primary Key =====
* AutoMatchDivisionConfigID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| division | DivisionID | [[database:tables:pears_division|pears.Division (divisionid)]] | ON DELETE CASCADE |
===== 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"."AutoMatchDivisionConfig"
-- Table comment: For use by Auto-matching procedures
-- Statement count: 10
CREATE TABLE "pears"."AutoMatchDivisionConfig" (
"AutoMatchDivisionConfigID" char(20) NOT NULL
,"DivisionID" char(20) NULL
,"LeadTime" integer NOT NULL
,"EscalationDelay" integer NOT NULL
,"Email" tinyint NULL
,"SMS" tinyint NULL
,"Push" tinyint NULL
,"QtyWorkers" integer NULL
,"PercentNew" integer NOT NULL
,"Urgency" smallint NULL
,PRIMARY KEY ("AutoMatchDivisionConfigID" ASC)
)
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."LeadTime" IS
'in hours'
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."EscalationDelay" IS
'in mins'
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."Email" IS
'ContactMethod'
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."SMS" IS
'ContactMethod'
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."Push" IS
'ContactMethod'
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."PercentNew" IS
'0 - 100'
go
COMMENT ON COLUMN "pears"."AutoMatchDivisionConfig"."Urgency" IS
'null means all'
go
COMMENT ON TABLE "pears"."AutoMatchDivisionConfig" IS
'For use by Auto-matching procedures'
go
ALTER TABLE "pears"."AutoMatchDivisionConfig"
ADD FOREIGN KEY "division" ("DivisionID" ASC)
REFERENCES "pears"."Division" ("divisionid")
ON DELETE CASCADE
go