tecdoc:preparenewbdfidelite

Ceci est une ancienne révision du document !


Procédure de mise en place d'une nouvelle BD fidélité

Dumper une base fidélité existante et la restaurer sur le serveur Labs avec le format de nom suivant : fidelia_<nom_client> Exemple : fidelia_elton

1- Nettoyage de la base test

**Désactiver les contraintes de clés étrangères** 
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE anomalie_enrolement; 
TRUNCATE audit_support_enrolement;
TRUNCATE badge_fidelite;
TRUNCATE campagne;
TRUNCATE campagne_evenement;
TRUNCATE campagne_evenement_categorie_participant;
TRUNCATE campagne_fidelite_client_capagne_extra;
TRUNCATE campagne_participant;
TRUNCATE campagne_participant_tmp;
TRUNCATE campagnefidelite_com_client;
TRUNCATE categorie_participant;
TRUNCATE com_message;
TRUNCATE coupon_genere;
TRUNCATE coupon_genere_business_unit;
TRUNCATE cynod_enrolement_fidelite_tmp;
TRUNCATE cynod_operation_fidelite_tmp;
TRUNCATE cynod_operation_fidelite_tmp_safe;
TRUNCATE fidelia_point_collecte;
TRUNCATE groupe_participants;
TRUNCATE historique_partcipant_point_renitialisation;
TRUNCATE historique_participant_campagne;
TRUNCATE historique_participant_enrolement;
TRUNCATE historique_renitialisation;
TRUNCATE import_point_collecte;
TRUNCATE lotagagner;
TRUNCATE lotagagner_business_unit;
TRUNCATE point_collecte;
TRUNCATE point_collecte_rejete;
TRUNCATE rabbit_message;
TRUNCATE rabbit_message_anomalie;
TRUNCATE random_sequence_row;
TRUNCATE random_tirage_table;
TRUNCATE regle_notification;
TRUNCATE regle_notification_participant;
TRUNCATE regle_notification_participant_tombola;
TRUNCATE regle_notification_tombola;
TRUNCATE rest_point_collecte_tmp;
TRUNCATE sms;
TRUNCATE tirage_gagnant;
TRUNCATE tombola;
TRUNCATE tombola_groupe_participants;
TRUNCATE tombola_participant;
TRUNCATE tombola_tirage;
TRUNCATE tombola_tirage_lot;
TRUNCATE unknow_client;
TRUNCATE unknow_client_resolvedd;
TRUNCATE user_campagne;
TRUNCATE ville;
TRUNCATE USER;
TRUNCATE ws_autorisation_coupon;
**Activer les contraintes de clés étrangères**
SET FOREIGN_KEY_CHECKS=1;

2- Exécution des requêtes ci-dessous :

**Ajout d’un USER admin avec comme mot de passe admin**
 
INSERT INTO USER (version,account_expired,account_locked,date_created,email,enabled,etablissement_id,last_updated,nom,password,password_expired,prenom,tel_mobile,user_created,user_type,user_updated,username) VALUES
	 (10,0,0,'2018-03-13 14:05:48',NULL,1,NULL,'2024-02-15 16:13:44','Admin','$2a$10$Yov7JJP4LDbUsYRkJO1rSeTpiAfYm6Hgzgc.aDINq0fWV86Q86sPi',0,'Admin',NULL,NULL,'ADM',NULL,'admin');
**Nettoyer la TABLE user_role**
DELETE FROM user_role WHERE user_id != 1;

3- Creer une campagne avec comme code SE et maintenir le code de l’application à CYNOD

4- Reprise de la liste des régions existantes de Cynod vers la BD de Fidélité

  • tecdoc/preparenewbdfidelite.1730986332.txt.gz
  • Dernière modification: 2024/11/07 13:32
  • par mamadou.gueye_sensoft.sn