CREATE TABLE Posting ( PostingId int(11) NOT NULL auto_increment, IPAddress varchar(255) NOT NULL default '', PosterAlias varchar(255) NOT NULL default '', Pending tinyint(4) NOT NULL default '0', Subject varchar(255) default NULL, PostingText text, GraphicsUrl varchar(255) default NULL, CreatedOn int(11) NOT NULL default '0', Modified int(11) NOT NULL default '0', ModifiedById int(11) default NULL, CreatedById int(11) default NULL, TopicId int(11) NOT NULL default '0', ResourceId int(11) NOT NULL default '0', ReplyTo int(11) NOT NULL default '0', Options int(11) NOT NULL default '0', PRIMARY KEY (PostingId), KEY TopicId (TopicId), KEY Pending (Pending), KEY CreatedById (CreatedById), KEY CreatedOn (CreatedOn), KEY ModifiedOn (Modified), KEY ModifiedById (ModifiedById) ) # -------------------------------------------------------- CREATE TABLE Topic ( TopicId int(11) NOT NULL auto_increment, NotifyOwnerOnChanges tinyint(4) NOT NULL default '0', Modified int(11) NOT NULL default '0', TopicText varchar(255) NOT NULL default '', Filename varchar(255) NOT NULL, AutomaticFilename tinyint(3) unsigned NOT NULL default '0', Posts int(11) NOT NULL default '0', Views double(20,6) NOT NULL default '0', EditorsPick tinyint(4) NOT NULL default '0', Status tinyint(4) default '0', Priority int(11) NOT NULL default '0', OwnerId int(11) NOT NULL default '0', ModifiedById int(11) NOT NULL default '0', ResourceId int(11) default NULL, TopicType int(11) NOT NULL default '0', CreatedOn int(11) NOT NULL default '0', CachedReviewsQty int(11) NOT NULL default '0', CachedRating varchar(10) default NULL, CachedVotesQty int(11) NOT NULL default '0', NewItem tinyint(4) NOT NULL default '2', PopItem tinyint(4) NOT NULL default '2', HotItem tinyint(4) NOT NULL default '2', PostedBy varchar(255) NOT NULL default '', OrgId int(11) default '0', LastPostId int(11) NOT NULL default '0', LastPostDate int(11) NOT NULL default '0', TodayDate date NOT NULL default '0000-00-00', TodayPosts int(11) NOT NULL default '0', PRIMARY KEY (TopicId), KEY OwnerId (OwnerId), UNIQUE KEY ResourceId (ResourceId), KEY ModifiedById (ModifiedById), KEY Posts (Posts), KEY Modified (Modified), KEY Filename (Filename(5)) ) # -------------------------------------------------------- CREATE TABLE Censorship ( CensorshipId int(11) NOT NULL auto_increment, BadWord varchar(80) NOT NULL default '', Replacement varchar(80) NOT NULL default '', PRIMARY KEY (CensorshipId) ) # -------------------------------------------------------- CREATE TABLE Emoticon ( EmoticonId int(11) NOT NULL auto_increment, Name varchar(20) NOT NULL default '', ImageId int(11) NOT NULL default '0', KeyStroke varchar(20) NOT NULL default '', Enabled int(11) NOT NULL default '1', PRIMARY KEY (EmoticonId) ) # -------------------------------------------------------- CREATE TABLE PrivateMessageBody ( PMBodyId int(11) unsigned NOT NULL auto_increment, Subject varchar(255) NOT NULL default '', Body text NOT NULL, Options tinyint(3) unsigned NOT NULL default '0', ReferenceCount smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (PMBodyId) ) # -------------------------------------------------------- CREATE TABLE PrivateMessages ( PmId int(11) unsigned NOT NULL auto_increment, FromId int(11) unsigned NOT NULL default '0', ToId int(11) unsigned NOT NULL default '0', FolderId tinyint(3) NOT NULL default '0', Status tinyint(1) unsigned NOT NULL default '0', PMBodyId int(11) unsigned NOT NULL default '0', CreatedOn int(11) unsigned NOT NULL default '0', PRIMARY KEY (PmId), KEY FromId (FromId), KEY CreatedOn (CreatedOn), KEY ToId (ToId) ) # -------------------------------------------------------- CREATE TABLE TopicCustomData ( CustomDataId int(11) NOT NULL auto_increment, ResourceId int(10) unsigned NOT NULL default '0', PRIMARY KEY (CustomDataId) ) # --------------------------------------------------------