ALTER TABLE `?:settings_objects` CHANGE `value` `value` text NOT NULL;
DROP TABLE `?:sitemap_descriptions`;
DROP TABLE `?:vendor_payouts`;

INSERT INTO `?:payment_processors` (processor_id, processor, processor_script, processor_template, admin_template, callback, type) VALUES ('90', 'Pay4Later', 'pay4later.php', 'cc_outside.tpl', 'pay4later.tpl', 'N', 'P') ON DUPLICATE KEY UPDATE `processor_id` = `processor_id`;
INSERT INTO `?:payment_processors` (processor_id, processor, processor_script, processor_template, admin_template, callback, type) VALUES ('91', 'Yes Credit', 'yes_credit.php', 'cc_outside.tpl', 'yes_credit.tpl', 'N', 'P') ON DUPLICATE KEY UPDATE `processor_id` = `processor_id`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('B', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('I', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('C', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('D', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('F', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('O', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('P', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:status_data` (status, type, param, value) VALUES ('A', 'O', 'remove_cc_info', 'Y') ON DUPLICATE KEY UPDATE `status` = `status`;
INSERT INTO `?:privileges` (privilege, is_default) VALUES ('manage_stores', 'Y') ON DUPLICATE KEY UPDATE `privilege` = `privilege`;
INSERT INTO `?:privileges` (privilege, is_default) VALUES ('view_stores', 'Y') ON DUPLICATE KEY UPDATE `privilege` = `privilege`;
INSERT INTO `?:privilege_descriptions` (`privilege`, `description`, `lang_code`, `section_id`) VALUES ('manage_stores', 'Manage stores', 'EN', 10), ('view_stores', 'View stores', 'EN', 10);

DELETE FROM `?:settings_objects` WHERE object_id='200';
DELETE FROM `?:privileges` WHERE privilege='view_suppliers';
DELETE FROM `?:privileges` WHERE privilege='manage_suppliers';
DELETE FROM `?:privileges` WHERE privilege='view_vendors';
DELETE FROM `?:privileges` WHERE privilege='manage_vendors';
DELETE FROM `?:privileges` WHERE privilege='view_payouts';
DELETE FROM `?:privileges` WHERE privilege='manage_payouts';

DELETE FROM `?:states` WHERE country_code='ES';
DELETE FROM `?:states` WHERE state_id='661';

REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(636, 'ES', 'C', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(637, 'ES', 'VI', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(638, 'ES', 'AB', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(639, 'ES', 'A', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(640, 'ES', 'AL', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(641, 'ES', 'O', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(642, 'ES', 'AV', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(643, 'ES', 'BA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(644, 'ES', 'PM', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(645, 'ES', 'B', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(646, 'ES', 'BU', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(647, 'ES', 'CC', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(648, 'ES', 'CA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(649, 'ES', 'S', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(650, 'ES', 'CS', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(651, 'ES', 'CE', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(652, 'ES', 'CR', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(653, 'ES', 'CO', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(654, 'ES', 'CU', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(655, 'ES', 'GI', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(656, 'ES', 'GR', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(657, 'ES', 'GU', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(658, 'ES', 'SS', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(659, 'ES', 'H', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(660, 'ES', 'HU', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(661, 'ES', 'J', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(662, 'ES', 'LO', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(663, 'ES', 'GC', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(664, 'ES', 'LE', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(665, 'ES', 'L', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(666, 'ES', 'LU', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(667, 'ES', 'M', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(668, 'ES', 'MA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(669, 'ES', 'ML', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(670, 'ES', 'MU', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(671, 'ES', 'NA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(672, 'ES', 'OR', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(673, 'ES', 'P', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(674, 'ES', 'PO', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(675, 'ES', 'SA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(676, 'ES', 'TF', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(677, 'ES', 'SG', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(678, 'ES', 'SE', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(679, 'ES', 'SO', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(680, 'ES', 'T', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(681, 'ES', 'TE', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(682, 'ES', 'TO', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(683, 'ES', 'V', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(684, 'ES', 'VA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(685, 'ES', 'BI', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(686, 'ES', 'ZA', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(687, 'ES', 'Z', 'A');
REPLACE INTO `?:states` (`state_id`, `country_code`, `code`, `status`) VALUES(688, 'BG', 'SF', 'A');
