-- Exécuté sur la base es de prod:
UPDATE `mf_pages`
SET
    `language` = 'es'
WHERE
    `mf_pages`.`language` = 'en';

ALTER TABLE `mf_pages` AUTO_INCREMENT = 5101001;

ALTER TABLE `mf_countries` ADD `cn_short_es` VARCHAR(256) CHARACTER
SET
    utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;

UPDATE `mf_countries`
SET
    `cn_short_es` = `cn_short_en`;

UPDATE `vz_circuits`
SET
    `language` = 'es'
WHERE
    `language` = 'en';

ALTER TABLE `vz_circuits` AUTO_INCREMENT = 5101001;

DELETE FROM `mf_contacts`;

ALTER TABLE `mf_contacts` AUTO_INCREMENT = 5101001;

DELETE FROM `mf_monetico_bank_feedback`;

ALTER TABLE `mf_monetico_bank_feedback` AUTO_INCREMENT = 5101001;

DELETE FROM `mf_monetico_capture`;

ALTER TABLE `mf_monetico_capture` AUTO_INCREMENT = 5101001;

DELETE FROM `mf_monetico_payment`;

ALTER TABLE `mf_monetico_payment` AUTO_INCREMENT = 5101001;

DELETE FROM `mf_news`;

ALTER TABLE `mf_news` AUTO_INCREMENT = 5101001;

-- mf_search_index : contient les données du moteur de recherche du site. Il est mis à jour dans le back-office, lorsqu'on clique sur "Reconstruire l'index" de
-- administration / Moteur de recherche
DELETE FROM `mf_search_index`;
-- PENSER A RECONSTRUIRE INDEX (dans back-office)

-- vz_texte_recherche : Contient les textes de description des rubriques (ex : VTT / Massif central). On les édite dans Gestion des circuits / Gestion des régions
-- Remarque : Ces textes ne sont pas indexés dans le moteur de recherche du site.

UPDATE `mf_siteInfos`
SET
    `language` = 'es';

UPDATE `mf_user`
SET
    `language` = 'es';

UPDATE `mf_usergroup`
SET
    `language` = 'es';

DELETE FROM `mf_videos`;

ALTER TABLE `mf_videos` AUTO_INCREMENT = 5101001;

DELETE FROM `v3_albums`;

ALTER TABLE `v3_albums` AUTO_INCREMENT = 5101001;

DELETE FROM `v3_images`;

ALTER TABLE `v3_images` AUTO_INCREMENT = 5101001;

DELETE FROM `v3_log_fiches`;
ALTER TABLE `v3_log_fiches` AUTO_INCREMENT = 5101001;

DELETE FROM `v4_calendrier`;

DELETE FROM `v4_fiches`;
ALTER TABLE `v4_fiches` AUTO_INCREMENT = 5101001;

DELETE FROM `v4_fiches_blocs`;
ALTER TABLE `v4_fiches_blocs` AUTO_INCREMENT = 5101001;


UPDATE `vz_niveaux`
SET
    language = "es"
WHERE
    language = 'en';

ALTER TABLE `vz_cat_hebergement` ADD libelle_es varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' NOT NULL;

DELETE FROM `v5_CBdiv`;
ALTER TABLE `v5_CBdiv` AUTO_INCREMENT = 5101001;

DELETE FROM vz_allibert_rest_auth;
ALTER TABLE `vz_allibert_rest_auth` AUTO_INCREMENT = 5101001;

DELETE FROM vz_circuits_old;

DELETE FROM vz_demande_catalogue;
ALTER TABLE `vz_demande_catalogue` AUTO_INCREMENT = 5101001;

UPDATE vz_departs 
SET
    language = "es"
WHERE
    language = 'en';

DELETE FROM vz_emailing_satisfaction;
ALTER TABLE `vz_emailing_satisfaction` AUTO_INCREMENT = 5101001;


DELETE FROM vz_orders_CB;
ALTER TABLE `vz_orders_CB` AUTO_INCREMENT = 5101001;

DELETE FROM vz_orders_resa;
ALTER TABLE `vz_orders_resa` AUTO_INCREMENT = 5101001;

DELETE FROM vz_participant_resa;
ALTER TABLE `vz_participant_resa` AUTO_INCREMENT = 5101001;

UPDATE vz_pret_a_partir  
SET
    language = "es"
WHERE
    language = 'en';

DELETE FROM vz_satisfaction;
ALTER TABLE `vz_satisfaction` AUTO_INCREMENT = 5101001;

DELETE FROM vz_satisfaction_recipient;
ALTER TABLE `vz_satisfaction_recipient` AUTO_INCREMENT = 5101001;

DELETE FROM vz_stats_referrer;
ALTER TABLE `vz_stats_referrer` AUTO_INCREMENT = 5101001;

DELETE FROM vz_stats_sale;
ALTER TABLE `vz_stats_sale` AUTO_INCREMENT = 5101001;


UPDATE vz_texte_recherche  
SET
    language = "es"
WHERE
    language = 'en';

UPDATE vz_theme_circuit 
SET
    language = "es"
WHERE
    language = 'en';

DELETE FROM vz_users;
ALTER TABLE `vz_users` AUTO_INCREMENT = 5101001;


-- -- TABLES A VIDER PLUS TARD (ON LES GARDE POUR DES TESTS POUR LE MOMENT
-- -- MAIS C EST JUSTE UNE COPIE DU EN, ENSUITE EN Espagnol LES UIDS VONT CHANGER)
-- DELETE FROM vz_departs;
-- ALTER TABLE `vz_departs` AUTO_INCREMENT = 5101001;

-- DELETE FROM vz_circuits;
-- ALTER TABLE `vz_circuits` AUTO_INCREMENT = 5101001;

-- DELETE FROM vz_niveaux;
-- ALTER TABLE `vz_niveaux` AUTO_INCREMENT = 5101001;

-- DELETE FROM vz_pret_a_partir;
-- ALTER TABLE `vz_pret_a_partir` AUTO_INCREMENT = 5101001;

-- DELETE FROM vz_theme_circuit;
-- ALTER TABLE `vz_theme_circuit` AUTO_INCREMENT = 5101001;


-- -- TABLES INUTILES A PRIORI
-- DROP TABLE `v5_BI`;
-- DROP TABLE `v4_niveaux`;
-- DROP TABLE `v5_CBdiv`;
-- DROP TABLE `vz_allibert_rest_auth`;
-- DROP TABLE `vz_circuits_old`;
-- DROP TABLE `vz_demande_catalogue`;
