-- 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