CREATE TABLE IF NOT EXISTS `error` (
  `ID` int(11) NOT NULL auto_increment,
  `Error` text,
  `Created` datetime default NULL,
  PRIMARY KEY  (`ID`),
  KEY `Created` (`Created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `file_meta` (
  `ID` int(11) NOT NULL auto_increment,
  `Item_Type` varchar(255) default NULL,
  `Item_ID` int(11) default NULL,
  `Item_Field` varchar(255) default NULL,
  `Item_Index` int(11) default NULL,
  `Title` varchar(255) default NULL,
  `Size` int(11) default NULL,
  `Mime` varchar(255) default NULL,
  `Extension` varchar(10) default NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`),
  KEY `Item_Type` (`Item_Type`,`Item_ID`,`Item_Field`,`Item_Index`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `image_meta` (
  `ID` int(11) NOT NULL auto_increment,
  `Item_Type` varchar(255) default NULL,
  `Item_ID` varchar(255) default NULL,
  `Item_Field` varchar(255) default NULL,
  `Item_Index` int(11) default NULL,
  `Title` varchar(255) default NULL,
  `Size` int(11) default NULL,
  `Mime` varchar(255) default NULL,
  `Extension` varchar(10) default NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`),
  KEY `Item_Type` (`Item_Type`,`Item_ID`,`Item_Field`,`Item_Index`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `user` (
  `ID` int(11) NOT NULL auto_increment,
  `_page` int(11) default NULL,
  `Title` varchar(255) default NULL,
  `Username` varchar(255) default NULL,
  `Password` varchar(255) default NULL,
  `Email` varchar(255) default NULL,
  `Last_Login` datetime default NULL,
  `Admin` tinyint(1) default NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `website_settings` (
  `ID` int(11) NOT NULL auto_increment,
  `Settings_Ref` varchar(255) NOT NULL,
  `Value` varchar(255) NOT NULL,
  `Admin` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;