====== pears.StoredQuickLookup ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Stores saved searches so that they can be accessed quicker via UI.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **StoredQuickLookupID** | char(20) | NOT NULL | | |
| Type | char(1) | NOT NULL | | P Person, C Company etc. |
| StoredSelectionID | char(20) | NULL | | |
| StoredSearchID | char(20) | NULL | | |
| SortOrder | integer | NULL | | |
| DepartmentID | char(2) | NULL | | |
===== Primary Key =====
* StoredQuickLookupID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| StoredSelection | StoredSelectionID | [[database:tables:pears_storedselection|pears.storedselection (storedselectionid)]] | ON DELETE CASCADE |
| StoredSearch | StoredSearchID | [[database:tables:pears_storedsearch|pears.storedsearch (storedsearchid)]] | ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
^ Name ^ Timing ^ Event ^
| WPK_StoredQuickLookup_STOREDQUICKLOOKUP | after | insert,delete,update order 1 |
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."StoredQuickLookup"
-- Table comment: Stores saved searches so that they can be accessed quicker via UI.
-- Statement count: 7
CREATE TABLE "pears"."StoredQuickLookup" (
"StoredQuickLookupID" char(20) NOT NULL
,"Type" char(1) NOT NULL
,"StoredSelectionID" char(20) NULL
,"StoredSearchID" char(20) NULL
,"SortOrder" integer NULL
,"DepartmentID" char(2) NULL
,PRIMARY KEY ("StoredQuickLookupID" ASC)
)
go
COMMENT ON COLUMN "pears"."StoredQuickLookup"."Type" IS
'P Person, C Company etc.'
go
COMMENT ON TABLE "pears"."StoredQuickLookup" IS
'Stores saved searches so that they can be accessed quicker via UI.'
go
ALTER TABLE "pears"."StoredQuickLookup"
ADD FOREIGN KEY "StoredSelection" ("StoredSelectionID" ASC)
REFERENCES "pears"."storedselection" ("storedselectionid")
ON DELETE CASCADE
go
ALTER TABLE "pears"."StoredQuickLookup"
ADD FOREIGN KEY "StoredSearch" ("StoredSearchID" ASC)
REFERENCES "pears"."storedsearch" ("storedsearchid")
ON DELETE CASCADE
go
create trigger "WPK_StoredQuickLookup_STOREDQUICKLOOKUP" after insert,delete,update order 1 on
"pears"."StoredQuickLookup"
for each statement
begin
call "WPKTrackChange"('P','STOREDQUICKLOOKUP')
end
go
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."StoredQuickLookup"."WPK_StoredQuickLookup_STOREDQUICKLOOKUP" IS
{create trigger WPK_StoredQuickLookup_STOREDQUICKLOOKUP
after insert,delete,update order 1 on
StoredQuickLookup
for each statement
begin
call WPKTrackChange('P','STOREDQUICKLOOKUP')
end
}
go