-- 10200 to 10300

-- main
-- nada na main
-- domain

ALTER TABLE  `CheckIn` ADD  `item_type` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT  'listing' COMMENT  'listing/event' AFTER  `item_id` ;
ALTER TABLE  `Leads` ADD  `new` CHAR( 1 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT  'y' COMMENT  'y/n';
ALTER TABLE  `Post` DROP INDEX  `legacy_id` , ADD UNIQUE  `legacy_id` (  `legacy_id` ( 7 ) );
ALTER TABLE  `Review` ADD  `new` CHAR( 1 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT  'y' COMMENT  'y/n';
ALTER TABLE  `Setting` CHANGE  `value`  `value` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;

DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Manage Listings%';
DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Manage Deals%';
DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Manage Events%';
DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Manage Banners%';
DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Manage Classifieds%';
DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Manage Articles%';
DELETE FROM `Content` WHERE `Content`.`type` LIKE 'Add Profile Welcome Page';
DELETE FROM `FAQ` WHERE `FAQ`.`question` LIKE '%Can I change my items status (active, pending or suspended)?%';

INSERT INTO  `Content` (`id` ,`updated` ,`type` ,`title` ,`description` ,`keywords` ,`url` ,`section` ,`content` ,`sitemap`) VALUES (NULL ,  '0000-00-00 00:00:00',  'Listing Change Level',  'Listing Change Level',  '',  '',  '',  'member',  '',  '0');
INSERT INTO  `Content` (`id` ,`updated` ,`type` ,`title` ,`description` ,`keywords` ,`url` ,`section` ,`content` ,`sitemap`) VALUES (NULL ,  '0000-00-00 00:00:00',  'Event Change Level',  'Event Change Level',  '',  '',  '',  'member',  '',  '0');
INSERT INTO  `Content` (`id` ,`updated` ,`type` ,`title` ,`description` ,`keywords` ,`url` ,`section` ,`content` ,`sitemap`)VALUES (NULL ,  '0000-00-00 00:00:00',  'Classified Change Level',  'Classified Change Level',  '',  '',  '',  'member',  '',  '0');

UPDATE `Email_Notification` SET use_variables = concat(use_variables, ',MEMBERS_URL') WHERE `body` LIKE  '%members%';
UPDATE `Email_Notification` SET body = REPLACE(body, '/members', '/MEMBERS_URL') WHERE `body` LIKE  '%members%';
UPDATE `Email_Notification` SET body = REPLACE(body, '"Manage Events"', '"Dashboard"') WHERE `body` LIKE  '%/MEMBERS_URL%';
UPDATE `Email_Notification` SET body = REPLACE(body, '"Manage Articles"', '"Dashboard"') WHERE `body` LIKE  '%/MEMBERS_URL%';
UPDATE `Email_Notification` SET body = REPLACE(body, '"Manage Classifieds"', '"Dashboard"') WHERE `body` LIKE  '%/MEMBERS_URL%';
UPDATE `Email_Notification` SET body = REPLACE(body, '"Manage Banners"', '"Dashboard"') WHERE `body` LIKE  '%/MEMBERS_URL%';
UPDATE `Email_Notification` SET body = REPLACE(body, '"Manage Account"', '"Account"') WHERE `body` LIKE  '%/MEMBERS_URL%';
UPDATE `Email_Notification` SET body = REPLACE(body, '"Manage Listings"', '"Dashboard"') WHERE `body` LIKE  '%/MEMBERS_URL%';
UPDATE `Email_Notification_Default` SET body_text = REPLACE(body_text, '/members', '/MEMBERS_URL') WHERE `body_text` LIKE  '%members%';
UPDATE `Email_Notification_Default` SET body_html = REPLACE(body_html, '/members', '/MEMBERS_URL') WHERE `body_html` LIKE  '%members%';

