pears.WPKGlobalSwitch

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

Woodpecker Switch definitions.

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
  • WPKGlobalSwitchID
Constraint Columns References Delete/update action
WPKGlobalSwitchGroup WPKGlobalSwitchGroupID pears.WPKGlobalSwitchGroup (WPKGlobalSwitchGroupID) NOT NULL;
  • No incoming foreign keys found.
Name Type Columns Detail
SwitchMaint1 Index WPKGlobalSwitchGroupID, SortOrder, WPKGlobalSwitchID
Name Timing Event
WPKTrackSwitchChange after insert,delete,update order 1
-- 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
  • database/tables/pears_wpkglobalswitch.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1