DROP TABLE IF EXISTS wbpagemetatag;
CREATE TABLE wbpagemetatag (
  pagemetatagid int(10) unsigned NOT NULL AUTO_INCREMENT,
  pagepath varchar(128) NOT NULL DEFAULT '',
  title varchar(255) NOT NULL DEFAULT '',
  description varchar(255) NOT NULL DEFAULT '',
  keywords varchar(255) NOT NULL DEFAULT '',
  created datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  changed datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  enabled tinyint(4) NOT NULL DEFAULT 0,
  deleted tinyint(4) NOT NULL DEFAULT 0,
  PRIMARY KEY (pagemetatagid),
  KEY (pagepath)
) ENGINE=MyISAM AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COMMENT='Wombat Metatag data';

DROP TABLE IF EXISTS `wbxmlarticle`;
CREATE TABLE `wbxmlarticle` (
  `cs` char(32) NOT NULL ,
  `urlid` int(10) unsigned NOT NULL DEFAULT '0',
  `status` enum('public', 'draft') NOT NULL default 'public',
  `revision` int(11) NOT NULL default '0',
  `uid` int(11) NOT NULL default '0',
  `created` datetime default NULL,
  `body` text NOT NULL,
  KEY  (`cs`),
  KEY `uid` (`uid`),
  KEY `urlid` (`urlid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Wombat XML Articles';

DROP TABLE IF EXISTS `wbxmlarticletranslation`;
CREATE TABLE `wbxmlarticletranslation` (
  `cs` char(32) NOT NULL,
  `lang` char(5) NOT NULL,
  `revision` int(11) NOT NULL default '0',
  `uid` int(11) NOT NULL default '0',
  `created` datetime default NULL,
  `body` text NOT NULL,
  KEY  (`cs`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Wombat XML Article translations';

DROP TABLE IF EXISTS wbtablesheet;
CREATE TABLE `wbtablesheet` (
  `tablesheetid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `created` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  `changed` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  `title` varchar(255) NOT NULL DEFAULT '',
  `blurb` text NOT NULL,
  `template` varchar(255) NOT NULL DEFAULT '',
  `class` varchar(255) NOT NULL DEFAULT '',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`tablesheetid`)
) ENGINE=MyISAM AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COMMENT='Generic table sheets' ;

DROP TABLE IF EXISTS wbtablesheetcell;
CREATE TABLE `wbtablesheetcell` (
  `tablesheetid` int(11) unsigned NOT NULL,
  `rowno` int(11) unsigned NOT NULL DEFAULT '0',
  `columnno` int(11) unsigned NOT NULL DEFAULT '0',
  `body` text NOT NULL,
  `class` varchar(255) NOT NULL DEFAULT '',
  KEY `tablesheetid` (`tablesheetid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Generic table sheets cells';

DROP TABLE IF EXISTS wbbanner;
CREATE TABLE `wbbanner` (
  `bannerid` int(11) NOT NULL AUTO_INCREMENT,
  `position` int(11) NOT NULL DEFAULT 0,
  `namespace` char(32) NOT NULL DEFAULT '',
  `uid` int(11) NOT NULL DEFAULT 0,
  `vfsfid` int(11) NOT NULL DEFAULT 0,
  `urlid` int(11) NOT NULL DEFAULT 0,
  `urltext` varchar(255) NOT NULL DEFAULT '',
  `class` varchar(255) NOT NULL DEFAULT '',
  `title` varchar(255) NOT NULL DEFAULT '',
  `brief` text NOT NULL DEFAULT '',
  `info` blob,
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`bannerid`),
  KEY (position)
  KEY (namespace)
) ENGINE=MyISAM AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COMMENT='List of Banner';
