CREATE TABLE News (
  NewsId int(11) NOT NULL auto_increment,
  Title varchar(255) NOT NULL default '',
  l1_Title varchar(255) NOT NULL default '',
  l2_Title varchar(255) NOT NULL default '',
  l3_Title varchar(255) NOT NULL default '',
  l4_Title varchar(255) NOT NULL default '',
  l5_Title varchar(255) NOT NULL default '',
  AutomaticFilename tinyint(3) unsigned NOT NULL default '1',
  Excerpt text,
  l1_Excerpt text,
  l2_Excerpt text,
  l3_Excerpt text,
  l4_Excerpt text,
  l5_Excerpt text,
  Author varchar(255) NOT NULL default '',
  Body text,
  l1_Body text,
  l2_Body text,
  l3_Body text,
  l4_Body text,
  l5_Body text,
  MetaKeywords varchar(255) DEFAULT NULL,
  MetaDescription text NULL DEFAULT NULL,
  CreatedOn int(11) NOT NULL default '0',
  TextFormat int(11) NOT NULL default '0',
  EndOn INT(11) NULL DEFAULT NULL,
  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 '-1',
  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 '-1',
  OrgId int(11) default NULL,
  PRIMARY KEY  (NewsId),
  UNIQUE KEY ResourceId (ResourceId),
  KEY Title (Title),
  KEY l1_Title (l1_Title),
  KEY l2_Title (l2_Title),
  KEY l3_Title (l3_Title),
  KEY l4_Title (l4_Title),
  KEY l5_Title (l5_Title),
  KEY Excerpt (Excerpt(5)),
  KEY l1_Excerpt (l1_Excerpt(5)),
  KEY l2_Excerpt (l2_Excerpt(5)),
  KEY l3_Excerpt (l3_Excerpt(5)),
  KEY l4_Excerpt (l4_Excerpt(5)),
  KEY l5_Excerpt (l5_Excerpt(5)),
  KEY Body (Body(5)),
  KEY l1_Body (l1_Body(5)),
  KEY l2_Body (l2_Body(5)),
  KEY l3_Body (l3_Body(5)),
  KEY l4_Body (l4_Body(5)),
  KEY l5_Body (l5_Body(5)),
  KEY CreatedOn (CreatedOn),
  KEY EndOn (EndOn),
  KEY Priority (Priority),
  KEY Status (Status),
  KEY EditorsPick (EditorsPick),
  KEY Hits (Hits),
  KEY Modified (Modified),
  KEY NewItem (NewItem),
  KEY PopItem (PopItem),
  KEY HotItem (HotItem),
  KEY StartDate (StartDate),
  KEY Archived (Archived)
);

CREATE TABLE NewsCustomData (
  CustomDataId int(11) NOT NULL auto_increment,
  ResourceId int(10) unsigned NOT NULL default '0',
  KEY ResourceId (ResourceId),
  PRIMARY KEY  (CustomDataId)
);