====== pears.MIMEMessage ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== Used in constructing MIME email message. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **MIMEMessageID** | char(20) | NOT NULL | | | | HashCode | integer | NULL | | | | Source | tinyint | NULL | | 0=Internally generated 1=Desktop fetch from IMAP | | SentOrReceived | char(1) | NOT NULL | | S=Sent R=Received | | staffid | char(20) | NULL | | | | MIMEBody | long binary | NULL | | | | DateTime | timestamp | NOT NULL | | | | SenderAddress | char(100) | NULL | | | | RecipientAddresses | char(250) | NULL | | | | Subject | char(120) | NULL | | | | BodyText | long varchar | NULL | | | | Attachments | char(250) | NULL | | | ===== Primary Key ===== * MIMEMessageID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | staff | staffid | [[database:tables:pears_staff|pears.staff (staffid)]] | ON DELETE SET NULL | ===== Referenced By ===== ^ Table ^ Constraint ^ Columns ^ Referenced columns ^ | [[database:tables:pears_contactevent|pears.contactevent]] | MIMEMessage | MIMEMessageID | MIMEMessageID | ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | MIMEMessage_HashCode | Index | HashCode | | ===== Triggers ===== * No triggers found. ===== Original SQL ===== -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."MIMEMessage" -- Table comment: Used in constructing MIME email message. -- Statement count: 6 CREATE TABLE "pears"."MIMEMessage" ( "MIMEMessageID" char(20) NOT NULL ,"HashCode" integer NULL ,"Source" tinyint NULL ,"SentOrReceived" char(1) NOT NULL ,"staffid" char(20) NULL ,"MIMEBody" long binary NULL ,"DateTime" timestamp NOT NULL ,"SenderAddress" char(100) NULL ,"RecipientAddresses" char(250) NULL ,"Subject" char(120) NULL ,"BodyText" long varchar NULL ,"Attachments" char(250) NULL ,PRIMARY KEY ("MIMEMessageID" ASC) ) go COMMENT ON COLUMN "pears"."MIMEMessage"."Source" IS '0=Internally generated 1=Desktop fetch from IMAP' go COMMENT ON COLUMN "pears"."MIMEMessage"."SentOrReceived" IS 'S=Sent R=Received' go COMMENT ON TABLE "pears"."MIMEMessage" IS 'Used in constructing MIME email message.' go ALTER TABLE "pears"."MIMEMessage" ADD FOREIGN KEY "staff" ("staffid" ASC) REFERENCES "pears"."staff" ("staffid") ON DELETE SET NULL go CREATE INDEX "MIMEMessage_HashCode" ON "pears"."MIMEMessage" ( "HashCode" ) go