pears.WPKPickList
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Description
Woodpecker centrally defined (and therefore cached and re-suable) pick lists. Defined either by SQL or choices listed in WPKPickListChoice.
Columns
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| WPKPickListID | char(20) | NOT NULL | ||
| Name | char(50) | NOT NULL | ||
| SQLQuery | long varchar | NULL | select description,value from … If blank uses the WPKPickListChoice items | |
| Notes | long varchar | NULL | ||
| AltWPKTrackerID | char(100) | NULL | Allows subset sql query lists to track changes to the table as a whole (or MULTIPLE tables - use comma sep list) for simplicity of maintenance |
Primary Key
- WPKPickListID
Foreign Keys
- No outgoing foreign keys found.
Referenced By
| Table | Constraint | Columns | Referenced columns |
|---|---|---|---|
| pears.WPKPickListChoice | WPKPickList | WPKPickListID | WPKPickListID |
Indexes
- No indexes found.
Triggers
| Name | Timing | Event |
|---|---|---|
| WPKPickChange | after | insert,delete,update order 1 |
Original SQL
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."WPKPickList" -- Table comment: Woodpecker centrally defined (and therefore cached and re-suable) pick lists. Defined either by SQL or choices listed in WPKPickListChoice. -- Statement count: 6 CREATE TABLE "pears"."WPKPickList" ( "WPKPickListID" CHAR(20) NOT NULL ,"Name" CHAR(50) NOT NULL ,"SQLQuery" long VARCHAR NULL ,"Notes" long VARCHAR NULL ,"AltWPKTrackerID" CHAR(100) NULL ,PRIMARY KEY ("WPKPickListID" ASC) ) GO COMMENT ON COLUMN "pears"."WPKPickList"."SQLQuery" IS 'select description,value from ... If blank uses the WPKPickListChoice items' GO COMMENT ON COLUMN "pears"."WPKPickList"."AltWPKTrackerID" IS 'Allows subset sql query lists to track changes to the table as a whole (or MULTIPLE tables - use comma sep list) for simplicity of maintenance' GO COMMENT ON TABLE "pears"."WPKPickList" IS 'Woodpecker centrally defined (and therefore cached and re-suable) pick lists. Defined either by SQL or choices listed in WPKPickListChoice.' GO CREATE TRIGGER "WPKPickChange" after INSERT,DELETE,UPDATE ORDER 1 ON "pears"."WPKPickList" REFERENCING NEW AS "lst" FOR each ROW BEGIN CALL "WPKTrackChange"('P',"lst"."WPKPickListID"); CALL "WPKTrackChange"('P','*') END GO COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."WPKPickList"."WPKPickChange" IS {CREATE TRIGGER WPKPickChange after INSERT,DELETE,UPDATE ORDER 1 ON WPKPickList REFERENCING NEW AS lst FOR each ROW BEGIN CALL WPKTrackChange('P',lst.WPKPickListID); CALL WPKTrackChange('P','*') END } GO