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.WPKLayoutView ====== <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 ===== Links Woodpecker Views to Layouts. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **WPKLayoutID** | char(20) | NOT NULL | | | | **WPKViewID** | char(50) | NOT NULL | | | | **WPKFormID** | char(50) | NOT NULL | | | | SortOrder | smallint | NULL | | Orders the views on the outlook bar. Set to 0 to remove | ===== Primary Key ===== * WPKLayoutID, WPKViewID, WPKFormID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | Layout | WPKLayoutID, WPKFormID | [[database:tables:pears_wpklayout|pears.WPKLayout (WPKLayoutID, WPKFormID)]] | NOT NULL; ON DELETE CASCADE | | ViewK | WPKViewID, WPKFormID | [[database:tables:pears_wpkview|pears.WPKView (WPKViewID, WPKFormID)]] | NOT NULL; ON DELETE CASCADE | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== ^ Name ^ Timing ^ Event ^ | TrackLViewChange | after | insert,delete,update order 1 | ===== Original SQL ===== <code sql> -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."WPKLayoutView" -- Table comment: Links Woodpecker Views to Layouts. -- Statement count: 7 CREATE TABLE "pears"."WPKLayoutView" ( "WPKLayoutID" char(20) NOT NULL ,"WPKViewID" char(50) NOT NULL INLINE 50 PREFIX 8 ,"WPKFormID" char(50) NOT NULL INLINE 50 PREFIX 8 ,"SortOrder" smallint NULL ,PRIMARY KEY ("WPKLayoutID" ASC,"WPKViewID" ASC,"WPKFormID" ASC) ) go COMMENT ON COLUMN "pears"."WPKLayoutView"."SortOrder" IS 'Orders the views on the outlook bar. Set to 0 to remove' go COMMENT ON TABLE "pears"."WPKLayoutView" IS 'Links Woodpecker Views to Layouts.' go ALTER TABLE "pears"."WPKLayoutView" ADD NOT NULL FOREIGN KEY "Layout" ("WPKLayoutID" ASC,"WPKFormID" ASC) REFERENCES "pears"."WPKLayout" ("WPKLayoutID","WPKFormID") ON DELETE CASCADE go ALTER TABLE "pears"."WPKLayoutView" ADD NOT NULL FOREIGN KEY "ViewK" ("WPKViewID" ASC,"WPKFormID" ASC) REFERENCES "pears"."WPKView" ("WPKViewID","WPKFormID") ON DELETE CASCADE go create trigger "TrackLViewChange" after insert,delete,update order 1 on "pears"."WPKLayoutView" referencing new as "nlv" for each row begin call "WPKTrackChange"('F',"nlv"."WPKFormID") end go COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."WPKLayoutView"."TrackLViewChange" IS {create trigger TrackLViewChange after insert,delete,update order 1 on WPKLayoutView referencing new as nlv for each row begin call WPKTrackChange('F',nlv.WPKFormID) end } go </code> database/tables/pears_wpklayoutview.txt Last modified: 2026/08/07 19:24by 127.0.0.1