pears.EmailToSendAttachment

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

Column Type Null Default Comment
EmailToSendAttachmentID bigint NOT NULL autoincrement
EmailToSendID char(20) NOT NULL
IQACDocumentID char(8) NULL
OLEDocumentID char(20) NULL
BlobstoreID char(20) NULL
BlobstoreClass char(1) NULL
FileLocation long varchar NULL full path and filename of attachment if not in Blobstore
AttachmentType char(10) NULL invoice etc for special behaviour
  • EmailToSendAttachmentID
Constraint Columns References Delete/update action
EmailToSend EmailToSendID pears.EmailToSend (EmailToSendID) NOT NULL; ON DELETE CASCADE
IQacDocument IQACDocumentID pears.IQacDocument (DocumentID) ON DELETE CASCADE
oledocument OLEDocumentID pears.oledocument (oledocumentid) ON DELETE CASCADE
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."EmailToSendAttachment"
-- Table comment: 
-- Statement count: 6
 
CREATE TABLE "pears"."EmailToSendAttachment" (
    "EmailToSendAttachmentID"        BIGINT NOT NULL DEFAULT autoincrement
   ,"EmailToSendID"                  CHAR(20) NOT NULL
   ,"IQACDocumentID"                 CHAR(8) NULL
   ,"OLEDocumentID"                  CHAR(20) NULL
   ,"BlobstoreID"                    CHAR(20) NULL
   ,"BlobstoreClass"                 CHAR(1) NULL
   ,"FileLocation"                   long VARCHAR NULL
   ,"AttachmentType"                 CHAR(10) NULL
   ,PRIMARY KEY ("EmailToSendAttachmentID" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."EmailToSendAttachment"."FileLocation" IS 
	'full path and filename of attachment if not in Blobstore'
GO
 
 
COMMENT ON COLUMN "pears"."EmailToSendAttachment"."AttachmentType" IS 
	'invoice etc for special behaviour'
GO
 
 
ALTER TABLE "pears"."EmailToSendAttachment"
    ADD NOT NULL FOREIGN KEY "EmailToSend" ("EmailToSendID" ASC)
    REFERENCES "pears"."EmailToSend" ("EmailToSendID")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."EmailToSendAttachment"
    ADD FOREIGN KEY "IQacDocument" ("IQACDocumentID" ASC)
    REFERENCES "pears"."IQacDocument" ("DocumentID")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."EmailToSendAttachment"
    ADD FOREIGN KEY "oledocument" ("OLEDocumentID" ASC)
    REFERENCES "pears"."oledocument" ("oledocumentid")
    ON DELETE CASCADE
GO
  • database/tables/pears_emailtosendattachment.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1