SET FOREIGN_KEY_CHECKS=0;

ALTER DATABASE `bd_tinhdo` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

ALTER TABLE `bd_tinhdo`.`jnl_banque` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `bd_tinhdo`.`jnl_caisse` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `bd_tinhdo`.`mbr_dons` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `bd_tinhdo`.`membres` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `bd_tinhdo`.`p_comptes` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

ALTER TABLE `bd_tinhdo`.`jnl_banque` CHANGE `compte` `compte` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `bd_tinhdo`.`jnl_banque` CHANGE `libelle` `libelle` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`jnl_caisse` CHANGE `compte` `compte` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `bd_tinhdo`.`jnl_caisse` CHANGE `libelle` `libelle` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`mbr_dons` CHANGE `mode` `mode` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`mbr_dons` CHANGE `type` `type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `adresse` `adresse` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `adresse2` `adresse2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `civilite` `civilite` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `cp` `cp` char(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `email` `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `etat` `etat` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `mdp` `mdp` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `mdp_oublie` `mdp_oublie` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `nom` `nom` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `phap_danh` `phap_danh` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `prenom` `prenom` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `statut` `statut` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `tel_fixe` `tel_fixe` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `tel_mobile` `tel_mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`membres` CHANGE `ville` `ville` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`p_comptes` CHANGE `libelle` `libelle` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
ALTER TABLE `bd_tinhdo`.`p_comptes` CHANGE `no_compte` `no_compte` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;

ALTER TABLE `bd_tinhdo`.`membres` CHANGE `notes` `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;
SET FOREIGN_KEY_CHECKS=1;
