ALTER TABLE `pages` CHANGE `added` `created` DATETIME NOT NULL;
ALTER TABLE `pages` ADD IF NOT EXISTS `modified` DATETIME NULL AFTER `created`;
INSERT INTO `modules` SET `name`="Content Slider", `file_name`="content_slider", `class_name`="ContentSliderModule";

SELECT module_id FROM `modules` WHERE `file_name`="content_list" INTO @module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="newest_created" WHERE `key`="ordering" AND `value`="newest" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="oldest_created" WHERE `key`="ordering" AND `value`="oldest" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="above" WHERE `key`="show_title" AND `value`="1" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="center top" WHERE `key`="image_alignment" AND `value`="top center" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="center bottom" WHERE `key`="image_alignment" AND `value`="bottom center" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="center left" WHERE `key`="image_alignment" AND `value`="left center" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="center right" WHERE `key`="image_alignment" AND `value`="right center" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="no" WHERE `key`="strip_tags" AND `value`="0" AND `module_instances`.`module_id`=@module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `value`="some" WHERE `key`="strip_tags" AND `value`="1" AND `module_instances`.`module_id`=@module_id;

SELECT module_id FROM `modules` WHERE `file_name`="slideshow_nivoslider" INTO @module_id;
UPDATE `module_settings` INNER JOIN `module_instances` USING(`module_instance_id`) SET `key`="lightbox_theme" WHERE `key`="theme" AND `module_instances`.`module_id`=@module_id;
