ALTER TABLE `template` CHANGE `content` `content` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;
ALTER TABLE `page` ADD `preview_image` TEXT NULL DEFAULT NULL COMMENT 'Page Preview Image';
INSERT INTO `page_option` (`id`, `title`, `context`, `active`) VALUES ('option_search', 'Search landing page', 'Seotoaster pages', 1);
ALTER TABLE `form` ADD COLUMN `captcha` ENUM('0','1') DEFAULT '0' NULL;
INSERT INTO `config`(`name`, `value`) VALUES ('recapthaPublicKey', '6LcaJdASAAAAADyAWIdBYytJMmYPEykb3Otz4pp6');
INSERT INTO `config`(`name`, `value`) VALUES ('recapthaPrivateKey', '6LcaJdASAAAAAH-e1dWpk96PACf3BQG1OGGvh5hK');
CREATE TABLE IF NOT EXISTS `form_page_conversion` (
`page_id` int(10) unsigned NOT NULL,
`form_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`conversion_code` TEXT COLLATE utf8_unicode_ci NULL,
PRIMARY KEY (`page_id`,`form_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `form` DROP COLUMN `tracking_code`;
ALTER TABLE `user` ADD `gplus_profile` tinytext COLLATE 'utf8_unicode_ci' NULL;
INSERT INTO `template_type` (`id`, `title`) VALUES ('typemobile', 'Mobile page');
ALTER TABLE `optimized` ADD INDEX ( `nav_name` );
ALTER TABLE `optimized` ADD INDEX ( `url`(30) );
INSERT INTO `config` (`name`, `value`) VALUES ('version', '2.1.0');
INSERT INTO `template_type` (`id`, `title`) VALUES ('typemenu', 'Menu');
CREATE TABLE IF NOT EXISTS `user_attributes` (
`user_id` int(10) unsigned NOT NULL,
`attribute` tinytext COLLATE utf8_unicode_ci NOT NULL,
`value` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`user_id`,`attribute`(20)),
CONSTRAINT `user_attributes_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `optimized` ADD `seo_intro` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `teaser_text` ,
ADD `seo_intro_target` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `seo_intro`;
UPDATE `config` SET `name` = 'recaptchaPublicKey' WHERE `name` = 'recapthaPublicKey';
UPDATE `config` SET `name` = 'recaptchaPrivateKey' WHERE `name` = 'recapthaPrivateKey';
ALTER TABLE `email_triggers` ADD UNIQUE INDEX(`trigger_name`, `observer`);
ALTER TABLE `email_triggers_actions` ADD `service` ENUM( 'email', 'sms' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `id`;
UPDATE `email_triggers_actions` SET `service` = 'email' WHERE `service` IS NULL;
ALTER TABLE `plugin` ADD `version` varchar(20) COLLATE 'utf8_unicode_ci' NULL, COMMENT='';
ALTER TABLE `user` ADD `mobile_phone` varchar(20) COLLATE 'utf8_unicode_ci' NULL, COMMENT='';
ALTER TABLE `page` CHANGE `header_title` `header_title` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
ALTER TABLE `optimized` CHANGE `header_title` `header_title` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
INSERT INTO `template_type` (`id`, `title`) VALUES ('type_partial_template', 'Partial template');
ALTER TABLE `form` ADD COLUMN `mobile` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL;
ALTER TABLE `form` ADD COLUMN `enable_sms` enum('0','1') COLLATE utf8_unicode_ci DEFAULT '0';
ALTER TABLE `page_option` ADD COLUMN `option_usage` ENUM('once', 'many') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'many';
UPDATE `page_option` SET `option_usage`='once' WHERE `page_option`.`id` = 'option_member_landing';
UPDATE `page_option` SET `option_usage`='once' WHERE `page_option`.`id` = 'option_member_loginerror';
UPDATE `page_option` SET `option_usage`='once' WHERE `page_option`.`id` = 'option_member_signuplanding';
UPDATE `page_option` SET `option_usage`='once' WHERE `page_option`.`id` = 'option_search';
UPDATE `template_type` SET `title` = 'Regular' WHERE `id` = 'typeregular';
UPDATE `template_type` SET `title` = 'E-mail' WHERE `id` = 'typemail';
UPDATE `config` SET `value`='2.3.1' WHERE `name`='version';
SELECT value FROM `config` WHERE name = 'version';
INSERT INTO `template_type` (`id`, `title`) VALUES ('type_partial_template', 'Partial template');
UPDATE `config` SET `value`='2.2.6' WHERE `name`='version';
SELECT value FROM `config` WHERE name = 'version';