RENAME TABLE `qs_DPostTag` TO `qs_PostTag` ;
ALTER TABLE `qs_Post` CHANGE `idCategory` `categoryId` INT( 11 ) NOT NULL DEFAULT '0';
UPDATE `qs_DPageItemType` SET `type` = 'Blog\\' WHERE `qs_DPageItemType`.`id` = 13;

INSERT INTO `qs_Application` (`class`, `role`, `title`, `sorter`) VALUES
('App\\Blog\\Admin\\View', 'admin', 'Blog Posts', 340),
('App\\Blog\\Category\\Admin\\View', 'admin', 'Blog Categories', 350),
('App\\Blog\\Tag\\Admin\\View', 'admin', 'Blog Tags', 360),
('App\\Blog\\Comment\\Admin\\View', 'admin', 'Blog Post Comments', 370);

ALTER TABLE `qs_Post` ADD UNIQUE (`alias`);

ALTER TABLE `qs_PostCategory` ADD `alias` VARCHAR( 255 ) NULL AFTER `id` , ADD UNIQUE (`alias`);

INSERT INTO `qs_Application` (`class`, `role`, `title`, `sorter`) VALUES
('App\\Blog\\View', 'user', 'Blog Posts', 380);

INSERT INTO `qs_Application` (`class`, `role`, `title`, `sorter`) VALUES
('App\\Blog\\Comment\\View', 'user', 'Blog Post Comments', 390);


INSERT INTO `qs_Settings` (`name`, `idCategory`, `fieldType`, `label`, `value`, `options`, `description`, `required`, `system`, `sorter`, `added`, `changed`) VALUES
('blogCommentEmailHeader', 2, 'header', '', 'Blog Comment Submission Notification', '', '', 'n', 'n', 200, '2012-12-03 12:27:12', '2012-12-03 12:27:12'),
('blogCommentEmailSubject', 2, 'text', 'Subject', 'New blog comment have been submitted', '', '', 'y', 'n', 210, '2012-12-03 12:27:12', '2012-12-03 12:59:39'),
('blogCommentEmailFrom', 2, 'text', 'From Email Address', 'Adapta Interactive Framework <qsf@adaptainc.com>', '', '', 'y', 'n', 220, '2012-12-03 12:27:12', '2012-12-03 12:59:39'),
('blogCommentEmailTo', 2, 'emails', 'To Email Address(es) &nbsp; <span class="label_description">Enter email address(es) that should receive a notification email regarding Blog comments submissions on your website</span>', 'blog@vityk.fr-wd.com', '', 'Use commas to separate email addresses', 'n', 'n', 230, '2012-12-03 12:27:12', '2012-12-03 12:59:39'),
('blogCommentEmailBody', 2, 'HtmlEditor', 'Message Body', '<p>\r\n	New comments have been submitted.<br />\r\n	<br />\r\n	Post Title: <strong>{postTitle}</strong><br />\r\n	Comment Title: <strong>{commentTitle}</strong><br />\r\n	Author Name: <strong>{author}</strong><br />\r\n	Author Email: <strong>{email}</strong><br />\r\n	Comment:<br />\r\n	<strong>{comment}</strong><br />\r\n	<br />\r\n	Click <a href="{link}">here</a> to view details.</p>\r\n', '', 'Constants: {postTitle} {commentTitle} {author} {email} {comment} {link}', 'y', 'n', 240, '2012-12-03 12:27:12', '2012-12-03 12:59:39');

INSERT INTO `qs_SettingsOptions` (`id`, `name`, `variable`, `value`, `type`, `sorter`) VALUES
(NULL, 'blogCommentEmailBody', 'height', '200', 'int', NULL),
(NULL, 'blogCommentEmailBody', 'mode', 'view', 'string', NULL),
(NULL, 'blogCommentEmailBody', 'scriptOptions[enterMode]', '2', 'string', NULL),
(NULL, 'blogCommentEmailBody', 'toolbar', 'Basic', 'string', NULL);
