
CREATE TABLE IF NOT EXISTS `portfolio_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `keyword` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `portfolio_category_i18n` (
  `id` int(11) NOT NULL,
  `title` varchar(250) NOT NULL,
  `locale` varchar(5) NOT NULL DEFAULT 'en_US',
  KEY `id` (`id`),
  KEY `title` (`title`),
  KEY `locale` (`locale`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `portfolio_project` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `keyword` varchar(150) NOT NULL,
  `image` varchar(250) NOT NULL,
  `status` enum('Enabled','Disabled') NOT NULL DEFAULT 'Enabled',
  `featured` enum('Yes','No') NOT NULL DEFAULT 'Yes',
  PRIMARY KEY (`id`),
  KEY `keyword` (`keyword`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `portfolio_projectCategory` (
  `projectId` int(11) NOT NULL,
  `categoryId` int(11) NOT NULL,
  KEY `projectId` (`projectId`),
  KEY `categoryId` (`categoryId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `portfolio_projectResource` (
  `projectId` int(11) NOT NULL,
  `resource` varchar(250) NOT NULL,
  KEY `projectId` (`projectId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `portfolio_project_i18n` (
  `id` int(11) NOT NULL,
  `title` varchar(250) NOT NULL,
  `abstract` text NOT NULL,
  `description` text NOT NULL,
  `metaKeywords` varchar(500) NOT NULL,
  `metaDescr` varchar(500) NOT NULL,
  `metaTitle` varchar(500) NOT NULL,
  `locale` varchar(5) NOT NULL DEFAULT 'en_US',
  KEY `title` (`title`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `page_pages` ( `parentId`, `keyword`, `status`, `type`, `route`, `template`, `created`, `updated`) 
    VALUES (0, 'portfolio', 'Enabled', 'Module', 'portfolio', 'inner', NOW(), NOW());
INSERT INTO `page_pages_i18n` (`id`, `label`, `locale`) 
    VALUES (LAST_INSERT_ID(), 'Portfolio', 'en_US');