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.WPKGlobalSwitch ====== <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 ===== Woodpecker Switch definitions. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **WPKGlobalSwitchID** | char(20) | NOT NULL | | | | WPKGlobalSwitchGroupID | char(20) | NOT NULL | | | | Name | char(100) | NOT NULL | | | | DataType | char(1) | NOT NULL | | String, Date, Time, Integer, Number, Boolean, timestamP, Colour | | Notes | long varchar | NULL | | | | Source | char(1) | NOT NULL | | Literal, Switch, Database, Registry, INI, Environment, Params table | | Value | long varchar | NULL | | Literal value, switch id, select statement, Root;Key;Value;Default, INIFile;Section;Value;Default, Variable name, Params column | | Dynamic | tinyint | NULL | 0 | Causes re-evaluation on every invocation | | Locked | tinyint | NULL | 0 | Cannot be edited by end users (only for Literal and Params) | | Localisable | tinyint | NULL | 0 | Local over-rides allowed (only for Literal and Params) | | SortOrder | smallint | NULL | | | | IQXanywhere | smallint | NOT NULL | 0 | 1 for anywhere only, -1 for conventional only, 0 for both | ===== Primary Key ===== * WPKGlobalSwitchID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | WPKGlobalSwitchGroup | WPKGlobalSwitchGroupID | [[database:tables:pears_wpkglobalswitchgroup|pears.WPKGlobalSwitchGroup (WPKGlobalSwitchGroupID)]] | NOT NULL; | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | SwitchMaint1 | Index | WPKGlobalSwitchGroupID, SortOrder, WPKGlobalSwitchID | | ===== Triggers ===== ^ Name ^ Timing ^ Event ^ | WPKTrackSwitchChange | after | insert,delete,update order 1 | ===== Original SQL ===== <code sql> -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."WPKGlobalSwitch" -- Table comment: Woodpecker Switch definitions. -- Statement count: 13 CREATE TABLE "pears"."WPKGlobalSwitch" ( "WPKGlobalSwitchID" char(20) NOT NULL ,"WPKGlobalSwitchGroupID" char(20) NOT NULL ,"Name" char(100) NOT NULL ,"DataType" char(1) NOT NULL ,"Notes" long varchar NULL ,"Source" char(1) NOT NULL ,"Value" long varchar NULL ,"Dynamic" tinyint NULL DEFAULT 0 ,"Locked" tinyint NULL DEFAULT 0 ,"Localisable" tinyint NULL DEFAULT 0 ,"SortOrder" smallint NULL ,"IQXanywhere" smallint NOT NULL DEFAULT 0 ,PRIMARY KEY ("WPKGlobalSwitchID" ASC) ) go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."DataType" IS 'String, Date, Time, Integer, Number, Boolean, timestamP, Colour' go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."Source" IS 'Literal, Switch, Database, Registry, INI, Environment, Params table' go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."Value" IS 'Literal value, switch id, select statement, Root;Key;Value;Default, INIFile;Section;Value;Default, Variable name, Params column' go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."Dynamic" IS 'Causes re-evaluation on every invocation' go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."Locked" IS 'Cannot be edited by end users (only for Literal and Params)' go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."Localisable" IS 'Local over-rides allowed (only for Literal and Params)' go COMMENT ON COLUMN "pears"."WPKGlobalSwitch"."IQXanywhere" IS '1 for anywhere only, -1 for conventional only, 0 for both' go COMMENT ON TABLE "pears"."WPKGlobalSwitch" IS 'Woodpecker Switch definitions.' go ALTER TABLE "pears"."WPKGlobalSwitch" ADD NOT NULL FOREIGN KEY "WPKGlobalSwitchGroup" ("WPKGlobalSwitchGroupID" ASC) REFERENCES "pears"."WPKGlobalSwitchGroup" ("WPKGlobalSwitchGroupID") go CREATE INDEX "SwitchMaint1" ON "pears"."WPKGlobalSwitch" ( "WPKGlobalSwitchGroupID","SortOrder","WPKGlobalSwitchID" ) go create trigger "WPKTrackSwitchChange" after insert,delete,update order 1 on "pears"."WPKGlobalSwitch" for each statement begin call "WPKTrackChange"('S','*') end go COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."WPKGlobalSwitch"."WPKTrackSwitchChange" IS {create trigger WPKTrackSwitchChange after insert,delete,update order 1 on WPKGlobalSwitch for each statement begin call WPKTrackChange('S','*') end } go </code> database/tables/pears_wpkglobalswitch.txt Last modified: 2026/08/07 19:24by 127.0.0.1