CREATE TABLE IF NOT EXISTS `gallery` (
  `ID` int(11) NOT NULL auto_increment,
  `Publish_To_Gallery` tinyint(1) NOT NULL default '0',
  `Title` varchar(255) default NULL,
  `Order_By` int(11) default NULL,
  `Public` tinyint(1) NOT NULL default '0',
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`),
  KEY `Order_By` (`Order_By`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `gallery_image` (
  `ID` int(11) NOT NULL auto_increment,
  `Gallery_ID` int(11) default NULL,
  `Title` varchar(255) default NULL,
  `Alt` varchar(255) default NULL,
  `Description` text,
  `Order_By` int(11) default NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`),
  KEY `Gallery_ID` (`Gallery_ID`),
  KEY `Order_By` (`Order_By`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;