DROP TABLE IF EXISTS `Attachments`; CREATE TABLE `Attachments` ( `id` int(11) NOT NULL auto_increment, `TransactionId` int(11) NOT NULL default '0', `Parent` int(11) NOT NULL default '0', `MessageId` varchar(160) default NULL, `Subject` varchar(255) default NULL, `Filename` varchar(255) default NULL, `ContentType` varchar(80) default NULL, `ContentEncoding` varchar(80) default NULL, `Content` longtext, `Headers` longtext, `Creator` int(11) NOT NULL default '0', `Created` datetime default NULL, PRIMARY KEY (`id`), KEY `Attachments1` (`Parent`), KEY `Attachments2` (`TransactionId`), KEY `Attachments3` (`Parent`,`TransactionId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;