CREATE TABLE News (
  NewsId int(11) NOT NULL auto_increment,
  Title varchar(255) NOT NULL default '',
  Filename varchar(255) NOT NULL default '',
  AutomaticFilename tinyint(3) unsigned NOT NULL default '0',
  Excerpt text NOT NULL,
  Author varchar(255) NOT NULL default '',
  Body text NOT NULL,
  CreatedOn int(11) NOT NULL default '0',
  TextFormat int(11) NOT NULL default '0',
  EndOn int(11) NOT NULL default '0',
  Hits double(20,6) NOT NULL default '0.000000',
  CachedRating varchar(10) default '0',
  CachedVotesQty int(11) NOT NULL default '0',
  CreatedById int(11) NOT NULL default '0',
  Priority int(11) NOT NULL default '0',
  `Status` tinyint(4) NOT NULL default '2',
  EditorsPick tinyint(4) NOT NULL default '0',
  LeadStory tinyint(4) NOT NULL default '0',
  LeadCatStory tinyint(4) NOT NULL default '0',
  ResourceId int(11) default NULL,
  CachedReviewsQty int(11) NOT NULL default '0',
  StartDate 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',
  Archived int(11) NOT NULL default '0',
  Modified int(11) NOT NULL default '0',
  ModifiedById int(11) NOT NULL default '0',
  OrgId int(11) default NULL,
  PRIMARY KEY  (NewsId),
  UNIQUE KEY ResourceId (ResourceId),
  KEY Filename (Filename(5))
)
# --------------------------------------------------------
CREATE TABLE NewsCustomData (
  CustomDataId int(11) NOT NULL auto_increment,
  ResourceId int(10) unsigned NOT NULL default '0',
  KEY ResourceId (ResourceId),
  PRIMARY KEY  (CustomDataId)
)
# --------------------------------------------------------