# ************************************************************
# Sequel Pro SQL dump
# Version 3408
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: Localhost (MySQL 5.5.15)
# Database: contentbox
# Generation Time: 2012-02-07 18:55:55 +0000
# ************************************************************




# Dump of table cb_authorPermissions
# ------------------------------------------------------------


CREATE TABLE `cb_authorPermissions` (
  `FK_authorID` int(11) NOT NULL,
  `FK_permissionID` int(11) NOT NULL,
  KEY `FKE167E219AA6AC0EA` (`FK_authorID`),
  KEY `FKE167E21937C1A3F2` (`FK_permissionID`),
  CONSTRAINT `FKE167E21937C1A3F2` FOREIGN KEY (`FK_permissionID`) REFERENCES `cb_permission` (`permissionID`),
  CONSTRAINT `FKE167E219AA6AC0EA` FOREIGN KEY (`FK_authorID`) REFERENCES `cb_author` (`authorID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table cb_category
# ------------------------------------------------------------


CREATE TABLE `cb_category` (
  `categoryID` int(11) NOT NULL AUTO_INCREMENT,
  `category` varchar(200) NOT NULL,
  `slug` varchar(200) NOT NULL,
  PRIMARY KEY (`categoryID`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_category` (`categoryID`, `category`, `slug`)
VALUES
	(1,'News','news'),
	(2,'ColdFusion','coldfusion'),
	(3,'ColdBox','coldbox'),
	(4,'ContentBox','contentbox');



# Dump of table cb_comment
# ------------------------------------------------------------


CREATE TABLE `cb_comment` (
  `commentID` int(11) NOT NULL AUTO_INCREMENT,
  `content` longtext NOT NULL,
  `author` varchar(100) NOT NULL,
  `authorIP` varchar(100) NOT NULL,
  `authorEmail` varchar(255) NOT NULL,
  `authorURL` varchar(255) DEFAULT NULL,
  `createdDate` datetime NOT NULL,
  `isApproved` bit(1) NOT NULL DEFAULT b'0',
  `FK_contentID` int(11) NOT NULL,
  PRIMARY KEY (`commentID`),
  KEY `FKFFCED27F91F58374` (`FK_contentID`),
  KEY `idx_approved` (`isApproved`),
  KEY `idx_contentComment` (`isApproved`,`FK_contentID`),
  KEY `idx_createdDate` (`createdDate`),
  CONSTRAINT `FKFFCED27F91F58374` FOREIGN KEY (`FK_contentID`) REFERENCES `cb_content` (`contentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_comment` (`commentID`, `content`, `author`, `authorIP`, `authorEmail`, `authorURL`, `createdDate`, `isApproved`, `FK_contentID`)
VALUES
	(1,'What an amazing blog entry, congratulations!','Awesome Joe','127.0.0.1','awesomejoe@gocontentbox.com','www.gocontentbox.com/www.gocontentbox.com/www.gocontentbox.com','2012-02-03 14:13:39',b'1',1),
	(2,'I am some bad words and bad comment not approved','Bad Joe','127.0.0.1','badjoe@gocontentbox.com','www.gocontentbox.com','2012-02-03 14:13:39',b'0',1);



# Dump of table cb_contentversion
# ------------------------------------------------------------


CREATE TABLE `cb_contentversion` (
  `contentVersionID` int(11) NOT NULL AUTO_INCREMENT,
  `content` longtext NOT NULL,
  `changelog` longtext,
  `version` int(11) NOT NULL,
  `createdDate` datetime NOT NULL,
  `isActive` bit(1) NOT NULL DEFAULT b'0',
  `FK_authorID` int(11) NOT NULL,
  `FK_contentID` int(11) NOT NULL,
  PRIMARY KEY (`contentVersionID`),
  KEY `FKE166DFFAA6AC0EA` (`FK_authorID`),
  KEY `FKE166DFF91F58374` (`FK_contentID`),
  KEY `idx_active` (`isActive`),
  KEY `idx_contentVersions` (`isActive`,`FK_contentID`),
  KEY `idx_version` (`version`),
  KEY `idx_createdDate` (`createdDate`),
  CONSTRAINT `FKE166DFF91F58374` FOREIGN KEY (`FK_contentID`) REFERENCES `cb_content` (`contentID`),
  CONSTRAINT `FKE166DFFAA6AC0EA` FOREIGN KEY (`FK_authorID`) REFERENCES `cb_author` (`authorID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_contentversion` (`contentVersionID`, `content`, `changelog`, `version`, `createdDate`, `isActive`, `FK_authorID`, `FK_contentID`)
VALUES
	(1,'Hey everybody, this is my first blog entry made from ContentBox.  Isn\'t this amazing!\'','Initial creation',1,'2012-02-03 14:13:39',b'1',1,1),
	(2,'<p>Hey welcome to my about page for ContentBox, isn\'t this great!</p><p>{{{CustomHTML slug=\'contentbox\'}}}</p>','First creation',1,'2012-02-03 14:13:39',b'0',1,2),
	(3,'<p>\r\n	Hey welcome to my about page for ContentBox, isn&#39;t this great!</p>\r\n<p>\r\n	{{{CustomHTML slug=&#39;contentbox&#39;}}}</p>\r\n','',2,'2012-02-06 21:10:48',b'1',1,2);




# Dump of table cb_customhtml
# ------------------------------------------------------------


CREATE TABLE `cb_customhtml` (
  `contentID` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(200) NOT NULL,
  `slug` varchar(200) NOT NULL,
  `description` longtext,
  `content` longtext NOT NULL,
  `createdDate` datetime NOT NULL,
  PRIMARY KEY (`contentID`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_customHTML_slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_customhtml` (`contentID`, `title`, `slug`, `description`, `content`, `createdDate`)
VALUES
	(1,'ContactInfo','contentbox','Our contact information','<p style=\"text-align: center;\">\n	<a href=\"http://gocontentbox.org\"><img alt=\"\" src=\"/modules/contentbox/content/ContentBox_125.gif\" style=\"width: 124px; height: 118px;\" /></a></p>\n<p style=\"text-align: center;\">\n	Created by <a href=\"http://www.ortussolutions.com\">Ortus Solutions, Corp</a> and powered by <a href=\"http://coldbox.org\">ColdBox Platform</a>.</p>','2012-02-03 14:13:39');



# Dump of table cb_entry
# ------------------------------------------------------------


CREATE TABLE `cb_entry` (
  `contentID` int(11) NOT NULL,
  `excerpt` longtext,
  PRIMARY KEY (`contentID`),
  KEY `FK141674927FFF6A7` (`contentID`),
  CONSTRAINT `FK141674927FFF6A7` FOREIGN KEY (`contentID`) REFERENCES `cb_content` (`contentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_entry` (`contentID`, `excerpt`)
VALUES
	(1,'');



# Dump of table cb_entryCategories
# ------------------------------------------------------------


CREATE TABLE `cb_entryCategories` (
  `FK_contentID` int(11) NOT NULL,
  `FK_categoryID` int(11) NOT NULL,
  KEY `FKC01C884EF10ECD0` (`FK_categoryID`),
  KEY `FKC01C884EFB9F8BAD` (`FK_contentID`),
  CONSTRAINT `FKC01C884EF10ECD0` FOREIGN KEY (`FK_categoryID`) REFERENCES `cb_category` (`categoryID`),
  CONSTRAINT `FKC01C884EFB9F8BAD` FOREIGN KEY (`FK_contentID`) REFERENCES `cb_content` (`contentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table cb_page
# ------------------------------------------------------------


CREATE TABLE `cb_page` (
  `contentID` int(11) NOT NULL,
  `layout` varchar(200) DEFAULT NULL,
  `order` int(11) DEFAULT '0',
  `showInMenu` bit(1) NOT NULL DEFAULT b'1',
  PRIMARY KEY (`contentID`),
  KEY `FK21B2F26F9636A2E2` (`contentID`),
  KEY `idx_showInMenu` (`showInMenu`),
  CONSTRAINT `FK21B2F26F9636A2E2` FOREIGN KEY (`contentID`) REFERENCES `cb_content` (`contentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_page` (`contentID`, `layout`, `order`, `showInMenu`)
VALUES
	(2,'pageNoSidebar',1,b'1');



# Dump of table cb_permission
# ------------------------------------------------------------


CREATE TABLE `cb_permission` (
  `permissionID` int(11) NOT NULL AUTO_INCREMENT,
  `permission` varchar(255) NOT NULL,
  `description` longtext,
  PRIMARY KEY (`permissionID`),
  UNIQUE KEY `permission` (`permission`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_permission` (`permissionID`, `permission`, `description`)
VALUES
	(1,'PAGES_ADMIN','Ability to manage content pages, default is view only'),
	(2,'LAYOUT_ADMIN','Ability to manage layouts, default is view only'),
	(3,'WIDGET_ADMIN','Ability to manage widgets, default is view only'),
	(4,'GLOBALHTML_ADMIN','Ability to manage the system\'s global HTML content used on layouts'),
	(5,'TOOLS_IMPORT','Ability to import data into ContentBox'),
	(6,'SYSTEM_TAB','Access to the ContentBox System tools'),
	(7,'ENTRIES_ADMIN','Ability to manage blog entries, default is view only'),
	(8,'CUSTOMHTML_ADMIN','Ability to manage custom HTML, default is view only'),
	(9,'VERSIONS_ROLLBACK','Ability to rollback content versions'),
	(10,'RELOAD_MODULES','Ability to reload modules'),
	(11,'COMMENTS_ADMIN','Ability to manage comments, default is view only'),
	(12,'PERMISSIONS_ADMIN','Ability to manage permissions, default is view only'),
	(13,'AUTHOR_ADMIN','Ability to manage authors, default is view only'),
	(14,'MEDIAMANAGER_ADMIN','Ability to manage the system\'s media manager'),
	(15,'ROLES_ADMIN','Ability to manage roles, default is view only'),
	(16,'SYSTEM_RAW_SETTINGS','Access to the ContentBox raw geek settings panel'),
	(17,'CATEGORIES_ADMIN','Ability to manage categories, default is view only'),
	(18,'SYSTEM_SAVE_CONFIGURATION','Ability to update global configuration data'),
	(19,'VERSIONS_DELETE','Ability to delete past content versions'),
	(20,'EMAIL_TEMPLATE_ADMIN','Ability to manage the system\'s email templates'),
	(21,'SECURITYRULES_ADMIN','Ability to manage the system\'s security rules, default is view only');



# Dump of table cb_role
# ------------------------------------------------------------


CREATE TABLE `cb_role` (
  `roleID` int(11) NOT NULL AUTO_INCREMENT,
  `role` varchar(255) NOT NULL,
  `description` longtext,
  PRIMARY KEY (`roleID`),
  UNIQUE KEY `role` (`role`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_role` (`roleID`, `role`, `description`)
VALUES
	(1,'Editor','A ContentBox editor'),
	(2,'Administrator','A ContentBox Administrator');



# Dump of table cb_rolePermissions
# ------------------------------------------------------------


CREATE TABLE `cb_rolePermissions` (
  `FK_roleID` int(11) NOT NULL,
  `FK_permissionID` int(11) NOT NULL,
  KEY `FKDCCC1A4E9724FA40` (`FK_roleID`),
  KEY `FKDCCC1A4E37C1A3F2` (`FK_permissionID`),
  CONSTRAINT `FKDCCC1A4E37C1A3F2` FOREIGN KEY (`FK_permissionID`) REFERENCES `cb_permission` (`permissionID`),
  CONSTRAINT `FKDCCC1A4E9724FA40` FOREIGN KEY (`FK_roleID`) REFERENCES `cb_role` (`roleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_rolePermissions` (`FK_roleID`, `FK_permissionID`)
VALUES
	(1,11),
	(1,8),
	(1,1),
	(1,17),
	(1,7),
	(1,2),
	(1,4),
	(1,14),
	(1,9),
	(2,1),
	(2,2),
	(2,3),
	(2,4),
	(2,5),
	(2,6),
	(2,7),
	(2,8),
	(2,9),
	(2,10),
	(2,11),
	(2,12),
	(2,13),
	(2,14),
	(2,15),
	(2,16),
	(2,17),
	(2,18),
	(2,20),
	(2,19),
	(2,21);



# Dump of table cb_securityRule
# ------------------------------------------------------------


CREATE TABLE `cb_securityRule` (
  `ruleID` int(11) NOT NULL AUTO_INCREMENT,
  `whitelist` varchar(255) DEFAULT NULL,
  `securelist` varchar(255) NOT NULL,
  `roles` varchar(255) DEFAULT NULL,
  `permissions` longtext,
  `redirect` longtext NOT NULL,
  `useSSL` bit(1) DEFAULT b'0',
  `order` int(11) NOT NULL DEFAULT '0',
  `match` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ruleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_securityRule` (`ruleID`, `whitelist`, `securelist`, `roles`, `permissions`, `redirect`, `useSSL`, `order`, `match`)
VALUES
	(1,'','^contentbox-admin:mediamanager\\..*','','MEDIAMANAGER_ADMIN','cbadmin/security/login',b'0',1,'event'),
	(2,'','^contentbox-admin:versions\\.(remove)','','VERSIONS_DELETE','cbadmin/security/login',b'0',1,'event'),
	(3,'','^contentbox-admin:versions\\.(rollback)','','VERSIONS_ROLLBACK','cbadmin/security/login',b'0',1,'event'),
	(4,'','^contentbox-admin:emailtemplates\\..*','','EMAIL_TEMPLATE_ADMIN','cbadmin/security/login',b'0',2,'event'),
	(5,'','^contentbox-admin:widgets\\.(remove|upload|edit|save|create|doCreate)','','WIDGET_ADMIN','cbadmin/security/login',b'0',2,'event'),
	(6,'','^contentbox-admin:tools\\.(importer|doImport)','','TOOLS_IMPORT','cbadmin/security/login',b'0',3,'event'),
	(7,'','^contentbox-admin:(settings|permissions|roles|securityRules)\\..*','','SYSTEM_TAB','cbadmin/security/login',b'0',4,'event'),
	(8,'','^contentbox-admin:settings\\.save','','SYSTEM_SAVE_CONFIGURATION','cbadmin/security/login',b'0',5,'event'),
	(9,'','^contentbox-admin:settings\\.(raw|saveRaw|flushCache|flushSingletons|mappingDump|viewCached|remove)','','SYSTEM_RAW_SETTINGS','cbadmin/security/login',b'0',6,'event'),
	(10,'','^contentbox-admin:securityRules\\.(remove|save|changeOrder|apply)','','SECURITYRULES_ADMIN','cbadmin/security/login',b'0',7,'event'),
	(11,'','^contentbox-admin:roles\\.(remove|removePermission|save|savePermission)','','ROLES_ADMIN','cbadmin/security/login',b'0',8,'event'),
	(12,'','^contentbox-admin:permissions\\.(remove|save)','','PERMISSIONS_ADMIN','cbadmin/security/login',b'0',9,'event'),
	(13,'','^contentbox-admin:dashboard\\.reload','','RELOAD_MODULES','cbadmin/security/login',b'0',10,'event'),
	(14,'','^contentbox-admin:pages\\.(changeOrder|remove|save|editor)','','PAGES_ADMIN','cbadmin/security/login',b'0',11,'event'),
	(15,'','^contentbox-admin:layouts\\.(remove|upload|rebuildRegistry|activate)','','LAYOUT_ADMIN','cbadmin/security/login',b'0',12,'event'),
	(16,'','^contentbox-admin:entries\\.(quickPost|remove|save|editor)','','ENTRIES_ADMIN','cbadmin/security/login',b'0',13,'event'),
	(17,'','^contentbox-admin:customHTML\\.(editor|remove|save)','','CUSTOMHTML_ADMIN','cbadmin/security/login',b'0',14,'event'),
	(18,'','^contentbox-admin:comments\\.(doStatusUpdate|editor|moderate|remove|save|saveSettings)','','COMMENTS_ADMIN','cbadmin/security/login',b'0',15,'event'),
	(19,'','^contentbox-admin:categories\\.(remove|save)','','CATEGORIES_ADMIN','cbadmin/security/login',b'0',16,'event'),
	(20,'','^contentbox-admin:authors\\.(editor|passwordChange|remove|removePermission|save|savePermission)','','AUTHOR_ADMIN','cbadmin/security/login',b'0',17,'event'),
	(21,'^contentbox-admin:security\\.','^contentbox-admin:.*','','','cbadmin/security/login',b'0',18,'event'),
	(22,'','^contentbox-filebrowser:.*','','MEDIAMANAGER_ADMIN','cbadmin/security/login',b'0',19,'event');



# Dump of table cb_setting
# ------------------------------------------------------------


CREATE TABLE `cb_setting` (
  `settingID` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `value` longtext NOT NULL,
  PRIMARY KEY (`settingID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `cb_setting` (`settingID`, `name`, `value`)
VALUES
	(1,'cb_html_preCommentForm',''),
	(2,'cb_comments_moderation_blockedlist',''),
	(3,'cb_media_createFolders','true'),
	(4,'cb_paging_maxrows','20'),
	(5,'cb_site_name','ContentBox Express'),
	(6,'cb_comments_captcha','true'),
	(7,'cb_comments_urltranslations','true'),
	(8,'cb_comments_moderation_notify','true'),
	(9,'cb_site_tagline','The best site ever'),
	(10,'cb_comments_notify','true'),
	(11,'cb_rss_cachingTimeoutIdle','15'),
	(12,'cb_content_caching','true'),
	(13,'cb_media_uploadify_customOptions',''),
	(14,'cb_dashboard_recentPages','5'),
	(15,'cb_html_preEntryDisplay',''),
	(16,'cb_html_afterSideBar',''),
	(17,'cb_comments_enabled','true'),
	(18,'cb_html_postCommentForm',''),
	(19,'cb_rss_caching','true'),
	(20,'cb_paging_maxRSSComments','10'),
	(21,'cb_media_uplodify_fileDesc','All Files'),
	(22,'cb_html_postEntryDisplay',''),
	(23,'cb_site_description','Yes, the best site ever.'),
	(24,'cb_paging_maxentries','10'),
	(25,'cb_media_uploadify_allowMulti','true'),
	(26,'cb_html_afterFooter',''),
	(27,'cb_html_afterBodyStart',''),
	(28,'cb_site_layout','default'),
	(29,'cb_html_postIndexDisplay',''),
	(30,'cb_html_beforeContent',''),
	(31,'cb_dashboard_recentComments','5'),
	(32,'cb_gravatar_display','true'),
	(33,'cb_html_prePageDisplay',''),
	(34,'cb_html_preArchivesDisplay',''),
	(35,'cb_site_keywords',''),
	(36,'cb_site_homepage','cbBlog'),
	(37,'cb_rss_maxEntries','10'),
	(38,'cb_comments_maxDisplayChars','500'),
	(39,'cb_rss_cachingTimeout','60'),
	(40,'cb_html_beforeSideBar',''),
	(41,'cb_content_cacheName','Template'),
	(42,'cb_html_preIndexDisplay',''),
	(43,'cb_content_cachingTimeout','60'),
	(44,'cb_comments_moderation','true'),
	(45,'cb_media_uploadify_sizeLimit','0'),
	(46,'cb_html_beforeHeadEnd',''),
	(47,'cb_notify_entry','true'),
	(48,'cb_html_afterContent',''),
	(49,'cb_site_email','lmajano@ortussolutions.com'),
	(50,'cb_media_directoryRoot','/Users/lmajano/Sites/contentbox/www/modules/contentbox/content'),
	(51,'cb_rss_maxComments','10'),
	(52,'cb_media_acceptMimeTypes',''),
	(53,'cb_comments_notifyemails',''),
	(54,'cb_media_allowDownloads','true'),
	(55,'cb_media_allowDelete','true'),
	(56,'cb_html_postArchivesDisplay',''),
	(57,'cb_dashboard_recentEntries','5'),
	(58,'cb_rss_cacheName','Template'),
	(59,'cb_html_beforeBodyEnd',''),
	(60,'cb_comments_moderation_blacklist',''),
	(61,'cb_site_outgoingEmail','lmajano@ortussolutions.com'),
	(62,'cb_media_uplodify_fileExt','*.*;'),
	(63,'cb_paging_bandgap','5'),
	(64,'cb_gravatar_rating','PG'),
	(65,'cb_html_postPageDisplay',''),
	(66,'cb_comments_moderation_whitelist','true'),
	(67,'cb_notify_page','true'),
	(68,'cb_customHTML_caching','true'),
	(69,'cb_media_quickViewWidth','400'),
	(70,'cb_content_cachingTimeoutIdle','15'),
	(71,'cb_comments_whoisURL','http://whois.arin.net/ui/query.do?q'),
	(72,'cb_entry_caching','true'),
	(73,'cb_notify_author','true'),
	(74,'cb_media_allowUploads','true'),
	(75,'cb_active','true');




