CREATE TABLE IF NOT EXISTS `resource_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 `resource_document` (
  `ID` int(11) NOT NULL auto_increment,
  `Resource_ID` int(11) NOT NULL,
  `Title` varchar(255) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Path` varchar(255) NOT NULL,
  `Extension` varchar(20) default NULL,
  `Created` datetime NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `resource_item` (
  `ID` int(11) NOT NULL auto_increment,
  `Title` varchar(255) default NULL,
  `Date` datetime default NULL,
  `Description` varchar(255) default NULL,
  `Content` text,
  `Gallery_ID` 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 `resource_item_category` (
  `ID` int(11) NOT NULL auto_increment,
  `Resource_ID` int(11) NOT NULL,
  `Category_ID` int(11) NOT NULL,
  `Created` datetime default NULL,
  `Updated` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

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