CREATE TABLE IF NOT EXISTS `widget` (
  `ID` int(11) NOT NULL auto_increment,
  `Title` varchar(255) NOT NULL,
  `Summary` text NOT NULL,
  `Featured` tinyint(1) NOT NULL default '0',
  `Content` text NOT NULL,
  `Published` tinyint(1) NOT NULL default '1', 
  `Subtitle` varchar(255) NOT NULL,
  `Button_Text` varchar(255) default NULL,
  `Button_URL` varchar(255) default NULL,
  `Gallery_ID` int(11) NOT NULL,
  `Banner_ID` int(11) NOT NULL,
  `Side_Banner_ID` int(11) NOT NULL,
  `Video_URL` varchar(255) NOT NULL,
  `New_Window` tinyint(1) NOT NULL default '0',
  `SEO_Title` varchar(255) NOT NULL,
  `SEO_Keywords` varchar(255) NOT NULL,
  `SEO_Description` text NOT NULL,
  `Created` datetime NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `widget_category` (
  `ID` int(11) NOT NULL auto_increment,
  `Title` varchar(255) default NULL,
  `Order_By` int(11) default NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `widget_to_category` (
  `ID` int(11) NOT NULL auto_increment,
  `Widget_ID` int(11) default NULL,
  `Category_ID` int(11) default NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;