pears.agencydetails

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

Branch details. A branch usually represents a physical location.

Column Type Null Default Comment
agencyid char(20) NOT NULL
name char(30) NULL
defaultreportdirectory char(100) NULL
wpdocdirectory char(100) NULL
currency char(3) NULL
AddressEtc1 long varchar NULL
AddressEtc2 long varchar NULL
AddressEtc3 long varchar NULL
AddressEtc4 long varchar NULL
AddressEtc5 long varchar NULL
AddressEtc6 long varchar NULL
Analysis char(50) NULL
divisionid char(20) NULL
docstoragefolder char(100) NULL
SMTPServer char(20) NULL
IMAPServer char(20) NULL
Extra1 long varchar NULL
Extra2 long varchar NULL
Extra3 long varchar NULL
IQXNetEmailDetailsID char(20) NULL
  • agencyid
Constraint Columns References Delete/update action
division divisionid pears.Division (divisionid) ON DELETE SET NULL
SMTPServer SMTPServer pears.MailServer (MailServerID) ON DELETE SET NULL
IMAPServer IMAPServer pears.MailServer (MailServerID) ON DELETE SET NULL
IQXNetEmailDetails IQXNetEmailDetailsID pears.IQXNetEmailDetails (IQXNetEmailDetailsID) ON DELETE SET NULL
Table Constraint Columns Referenced columns
pears.Borough AgencyDetails AgencyID agencyid
pears.Country AgencyDetails AgencyID agencyid
pears.County AgencyDetails AgencyID agencyid
pears.globaldocument AgencyDetails AgencyID agencyid
pears.mailmerge agencydetails agencyid agencyid
pears.report agencydetails agencyid agencyid
pears.staff agencydetails agencyid agencyid
pears.TempHoliday agencydetails agencyid agencyid
pears.templatestore agencydetails agencyid agencyid
pears.Town AgencyDetails AgencyID agencyid
Name Type Columns Detail
agencydetails_name Index name
Name Timing Event
WPK_agencydetails_BRANCH after insert,delete,update order 1
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."agencydetails"
-- Table comment: Branch details. A branch usually represents a physical location.
-- Statement count: 9
 
CREATE TABLE "pears"."agencydetails" (
    "agencyid"                       CHAR(20) NOT NULL
   ,"name"                           CHAR(30) NULL
   ,"defaultreportdirectory"         CHAR(100) NULL
   ,"wpdocdirectory"                 CHAR(100) NULL
   ,"currency"                       CHAR(3) NULL
   ,"AddressEtc1"                    long VARCHAR NULL
   ,"AddressEtc2"                    long VARCHAR NULL
   ,"AddressEtc3"                    long VARCHAR NULL
   ,"AddressEtc4"                    long VARCHAR NULL
   ,"AddressEtc5"                    long VARCHAR NULL
   ,"AddressEtc6"                    long VARCHAR NULL
   ,"Analysis"                       CHAR(50) NULL
   ,"divisionid"                     CHAR(20) NULL
   ,"docstoragefolder"               CHAR(100) NULL
   ,"SMTPServer"                     CHAR(20) NULL
   ,"IMAPServer"                     CHAR(20) NULL
   ,"Extra1"                         long VARCHAR NULL
   ,"Extra2"                         long VARCHAR NULL
   ,"Extra3"                         long VARCHAR NULL
   ,"IQXNetEmailDetailsID"           CHAR(20) NULL
   ,PRIMARY KEY ("agencyid" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."agencydetails" IS 
	'Branch details. A branch usually represents a physical location.'
GO
 
 
-------------------------------------------------
--   Create foreign keys
-------------------------------------------------
 
ALTER TABLE "pears"."agencydetails"
    ADD FOREIGN KEY "division" ("divisionid" ASC)
    REFERENCES "pears"."Division" ("divisionid")
    ON DELETE SET NULL
GO
 
 
ALTER TABLE "pears"."agencydetails"
    ADD FOREIGN KEY "SMTPServer" ("SMTPServer" ASC)
    REFERENCES "pears"."MailServer" ("MailServerID")
    ON DELETE SET NULL
GO
 
 
ALTER TABLE "pears"."agencydetails"
    ADD FOREIGN KEY "IMAPServer" ("IMAPServer" ASC)
    REFERENCES "pears"."MailServer" ("MailServerID")
    ON DELETE SET NULL
GO
 
 
ALTER TABLE "pears"."agencydetails"
    ADD FOREIGN KEY "IQXNetEmailDetails" ("IQXNetEmailDetailsID" ASC)
    REFERENCES "pears"."IQXNetEmailDetails" ("IQXNetEmailDetailsID")
    ON DELETE SET NULL
GO
 
 
CREATE INDEX "agencydetails_name" ON "pears"."agencydetails"
    ( "name" )
GO
 
 
CREATE TRIGGER "WPK_agencydetails_BRANCH" after INSERT,DELETE,UPDATE ORDER 1 ON
"pears"."agencydetails"
FOR each statement
BEGIN
  CALL "WPKTrackChange"('P','BRANCH')
END
GO
 
 
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."agencydetails"."WPK_agencydetails_BRANCH" IS 
{CREATE TRIGGER WPK_agencydetails_BRANCH 
 after INSERT,DELETE,UPDATE ORDER 1 ON
agencydetails
FOR each statement
BEGIN
  CALL WPKTrackChange('P','BRANCH')
END
}
GO
  • database/tables/pears_agencydetails.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1