Table of Contents



pears.WPKLayoutView

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

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

Foreign Keys

Constraint Columns References Delete/update action
Layout WPKLayoutID, WPKFormID pears.WPKLayout (WPKLayoutID, WPKFormID) NOT NULL; ON DELETE CASCADE
ViewK WPKViewID, WPKFormID pears.WPKView (WPKViewID, WPKFormID) NOT NULL; ON DELETE CASCADE

Referenced By

Indexes

Triggers

Name Timing Event
TrackLViewChange after insert,delete,update order 1

Original 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