--
-- Host: 51.161.115.64    Database: trombino_master
-- ------------------------------------------------------


--
-- Table structure for table `access`
--

CREATE TABLE `access` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tome` varchar(50) DEFAULT NULL,
  `website` varchar(200) DEFAULT NULL,
  `price` int NOT NULL DEFAULT '3800',
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `tome` (`tome`),
  KEY `website` (`website`),
  KEY `price` (`price`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `accessurl`
--

CREATE TABLE `accessurl` (
  `access_id` int NOT NULL AUTO_INCREMENT,
  `url` varchar(250) NOT NULL DEFAULT 'trombinomaroc.org',
  PRIMARY KEY (`access_id`,`url`),
  KEY `url` (`url`),
  KEY `access_id` (`access_id`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `admin_menu`
--

CREATE TABLE `admin_menu` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL DEFAULT '0',
  `order` int NOT NULL DEFAULT '0',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_operation_log`
--

CREATE TABLE `admin_operation_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `input` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_operation_log_user_id_index` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=627 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_permissions`
--

CREATE TABLE `admin_permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `http_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `http_path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_permissions_name_unique` (`name`),
  UNIQUE KEY `admin_permissions_slug_unique` (`slug`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_role_menu`
--

CREATE TABLE `admin_role_menu` (
  `role_id` int NOT NULL,
  `menu_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  KEY `admin_role_menu_role_id_menu_id_index` (`role_id`,`menu_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_role_permissions`
--

CREATE TABLE `admin_role_permissions` (
  `role_id` int NOT NULL,
  `permission_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  KEY `admin_role_permissions_role_id_permission_id_index` (`role_id`,`permission_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_role_users`
--

CREATE TABLE `admin_role_users` (
  `role_id` int NOT NULL,
  `user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  KEY `admin_role_users_role_id_user_id_index` (`role_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_roles`
--

CREATE TABLE `admin_roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_roles_name_unique` (`name`),
  UNIQUE KEY `admin_roles_slug_unique` (`slug`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `admin_user_permissions`
--

CREATE TABLE `admin_user_permissions` (
  `user_id` int NOT NULL,
  `permission_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  KEY `admin_user_permissions_user_id_permission_id_index` (`user_id`,`permission_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `advertisments`
--

CREATE TABLE `advertisments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(200) DEFAULT NULL,
  `link` varchar(500) DEFAULT NULL,
  `caption` text,
  `image` varchar(500) NOT NULL,
  `isenabled` tinyint NOT NULL,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `affectations`
--

CREATE TABLE `affectations` (
  `libelle` varchar(300) DEFAULT NULL,
  `entity_id` int NOT NULL,
  `fonctionnaire_id` int NOT NULL,
  `profil_id` int NOT NULL,
  `date_from` varchar(100) DEFAULT NULL,
  `date_to` varchar(200) DEFAULT NULL,
  `affectation_type` varchar(20) DEFAULT 'posthold',
  `created_at` datetime DEFAULT NULL,
  `ordre` int DEFAULT '1',
  `num_poste` varchar(255) DEFAULT NULL,
  `mail` varchar(255) DEFAULT NULL,
  `mail2` varchar(255) DEFAULT NULL,
  `mail3` varchar(255) DEFAULT NULL,
  `mail4` varchar(255) DEFAULT NULL,
  `mail5` varchar(255) DEFAULT NULL,
  `mail6` varchar(255) DEFAULT NULL,
  `mail7` varchar(255) DEFAULT NULL,
  `mail8` varchar(255) DEFAULT NULL,
  `gsm` varchar(255) DEFAULT NULL,
  `fax` varchar(255) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0',
  `dateserment_c` varchar(255) DEFAULT NULL,
  `validation_c` varchar(255) DEFAULT NULL,
  `assistant_phone` varchar(255) DEFAULT NULL,
  `assistant` varchar(255) DEFAULT NULL,
  `assistant_ar` varchar(255) DEFAULT NULL,
  `tauxremisecontact_c` varchar(255) DEFAULT NULL,
  `originecontactautre_c` varchar(255) DEFAULT NULL,
  `alt_address_country` varchar(255) DEFAULT NULL,
  `alt_address_postalcode` varchar(255) DEFAULT NULL,
  `alt_address_state` varchar(255) DEFAULT NULL,
  `alt_address_city` varchar(255) DEFAULT NULL,
  `alt_address_street` varchar(255) DEFAULT NULL,
  `primary_address_country` varchar(255) DEFAULT NULL,
  `primary_address_postalcode` varchar(255) DEFAULT NULL,
  `primary_address_state` varchar(255) DEFAULT NULL,
  `primary_address_city` varchar(255) DEFAULT NULL,
  `primary_address_street` varchar(255) DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `department_ar` varchar(255) DEFAULT NULL,
  `phone_work` varchar(255) DEFAULT NULL,
  `phone_other` varchar(255) DEFAULT NULL,
  `profession` varchar(255) DEFAULT NULL,
  `profession_ar` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `description_ar` varchar(255) DEFAULT NULL,
  `salutation` varchar(255) DEFAULT NULL,
  `salutation_ar` varchar(255) DEFAULT NULL,
  `alt_address_street_ar` text,
  `primary_address_street_ar` text,
  `test` varchar(200) DEFAULT NULL,
  `tome` varchar(2) DEFAULT NULL,
  `assistant_en` varchar(255) DEFAULT NULL,
  `department_en` varchar(255) DEFAULT NULL,
  `profession_en` varchar(255) DEFAULT NULL,
  `description_en` varchar(255) DEFAULT NULL,
  `salutation_en` varchar(255) DEFAULT NULL,
  `alt_address_street_en` varchar(255) DEFAULT NULL,
  `primary_address_street_en` varchar(255) DEFAULT NULL,
  `domaine` text,
  `specialite` text,
  `tomes` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`entity_id`,`fonctionnaire_id`,`profil_id`),
  KEY `fonctionnaire_id` (`fonctionnaire_id`),
  KEY `profil_id` (`profil_id`),
  KEY `test` (`test`),
  KEY `entity_id` (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `affectations_sync_insert` AFTER INSERT ON `affectations` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(NEW.entity_id) ON DUPLICATE KEY UPDATE entity_id=entity_id;
  INSERT INTO fonctionnaire_sync(fonctionnaire_id) VALUES(NEW.fonctionnaire_id) ON DUPLICATE KEY UPDATE fonctionnaire_id=fonctionnaire_id;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `affectations_sync_update` AFTER UPDATE ON `affectations` FOR EACH ROW BEGIN
INSERT INTO entity_sync(entity_id) VALUES(NEW.entity_id) ON DUPLICATE KEY UPDATE entity_id=entity_id;
INSERT INTO fonctionnaire_sync(fonctionnaire_id) VALUES(NEW.fonctionnaire_id) ON DUPLICATE KEY UPDATE fonctionnaire_id=fonctionnaire_id;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `affectations_sync_delete` AFTER DELETE ON `affectations` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(old.entity_id) ON DUPLICATE KEY UPDATE entity_id=entity_id;
  INSERT INTO fonctionnaire_sync(fonctionnaire_id) VALUES(old.fonctionnaire_id) ON DUPLICATE KEY UPDATE fonctionnaire_id=fonctionnaire_id;
END */;;
DELIMITER ;

--
-- Table structure for table `affectationshortcuts`
--

CREATE TABLE `affectationshortcuts` (
  `entity_id` int NOT NULL,
  `root_id` int NOT NULL,
  `access` varchar(10) NOT NULL DEFAULT 'view',
  `shortcut_source_id` varchar(60) NOT NULL,
  PRIMARY KEY (`entity_id`,`root_id`,`access`,`shortcut_source_id`) USING BTREE,
  KEY `shortcut_source_id` (`shortcut_source_id`),
  KEY `access` (`access`),
  KEY `root_id` (`root_id`),
  KEY `entity_id` (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `bultin`
--

CREATE TABLE `bultin` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user` varchar(20) NOT NULL,
  `operation` varchar(100) NOT NULL,
  `detail` varchar(2000) NOT NULL,
  `year` varchar(4) NOT NULL,
  `month` varchar(5) NOT NULL,
  `day` varchar(10) NOT NULL,
  `hour` varchar(10) NOT NULL,
  `tome` varchar(10) DEFAULT NULL,
  `element_id` varchar(100) DEFAULT NULL,
  `date` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user` (`user`),
  KEY `operation` (`operation`),
  KEY `detail` (`detail`(255)),
  KEY `year` (`year`),
  KEY `month` (`month`),
  KEY `day` (`day`),
  KEY `hour` (`hour`),
  KEY `tome` (`tome`),
  KEY `element_id` (`element_id`),
  KEY `date` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=375122 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `entity_id` int DEFAULT NULL,
  `libelle` varchar(255) NOT NULL,
  `description` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `parent_id` int DEFAULT NULL,
  `statut` int NOT NULL,
  `ordre` int DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `type` varchar(255) DEFAULT NULL,
  `viaID` varchar(250) DEFAULT NULL,
  `tome` int DEFAULT NULL,
  `test` varchar(200) DEFAULT NULL,
  `symlink` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PARENT_ID` (`parent_id`),
  KEY `entity_id` (`entity_id`),
  KEY `test` (`test`),
  KEY `symlink` (`symlink`)
) ENGINE=InnoDB AUTO_INCREMENT=56963739 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `cglu_components`
--

CREATE TABLE `cglu_components` (
  `id` int NOT NULL AUTO_INCREMENT,
  `prefix` varchar(255) NOT NULL,
  `clefs` varchar(255) NOT NULL,
  `data` longtext NOT NULL,
  `intitule` longtext,
  `image` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6524 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `cglu_dashboard`
--

CREATE TABLE `cglu_dashboard` (
  `id` int NOT NULL AUTO_INCREMENT,
  `clefs` varchar(20) NOT NULL,
  `data` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `intitule` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=444 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `cglu_events`
--

CREATE TABLE `cglu_events` (
  `id` int NOT NULL AUTO_INCREMENT,
  `titre` text,
  `img` varchar(255) DEFAULT NULL,
  `date_debut` varchar(255) DEFAULT NULL,
  `date_fin` varchar(255) DEFAULT NULL,
  `content` text,
  `ordre` int DEFAULT NULL,
  `status` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=86 DEFAULT CHARSET=latin1;

--
-- Table structure for table `column`
--

CREATE TABLE `column` (
  `name` varchar(200) NOT NULL,
  `libelle` varchar(200) DEFAULT NULL,
  `type` varchar(20) DEFAULT 'text',
  `relation` int DEFAULT NULL,
  `min` int DEFAULT '0',
  `max` int DEFAULT '10',
  `step` int DEFAULT '1',
  `items` text,
  PRIMARY KEY (`name`),
  UNIQUE KEY `libelle` (`name`),
  KEY `name` (`name`),
  KEY `libelle_2` (`libelle`),
  KEY `type` (`type`),
  KEY `relation` (`relation`),
  KEY `min` (`min`),
  KEY `max` (`max`),
  KEY `step` (`step`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `content_nodes`
--

CREATE TABLE `content_nodes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `page_id` int DEFAULT NULL,
  `node` varchar(50) DEFAULT NULL,
  `content` text,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `page_id` (`page_id`),
  KEY `node` (`node`)
) ENGINE=InnoDB AUTO_INCREMENT=1359 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `data_rows`
--

CREATE TABLE `data_rows` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `data_type_id` int unsigned NOT NULL,
  `field` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `browse` tinyint(1) NOT NULL DEFAULT '1',
  `read` tinyint(1) NOT NULL DEFAULT '1',
  `edit` tinyint(1) NOT NULL DEFAULT '1',
  `add` tinyint(1) NOT NULL DEFAULT '1',
  `delete` tinyint(1) NOT NULL DEFAULT '1',
  `details` text COLLATE utf8mb4_unicode_ci,
  `order` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `data_rows_data_type_id_foreign` (`data_type_id`),
  CONSTRAINT `data_rows_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `data_types`
--

CREATE TABLE `data_types` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name_singular` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name_plural` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `icon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `policy_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `controller` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `generate_permissions` tinyint(1) NOT NULL DEFAULT '0',
  `server_side` tinyint NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `data_types_name_unique` (`name`),
  UNIQUE KEY `data_types_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `datatype`
--

CREATE TABLE `datatype` (
  `name` varchar(120) NOT NULL,
  `group` varchar(100) NOT NULL DEFAULT 'kyc',
  `t` int DEFAULT NULL,
  `company` tinyint(1) DEFAULT '0',
  `file` tinyint(1) DEFAULT '0',
  `official` tinyint(1) DEFAULT '0',
  `libelle` varchar(200) DEFAULT NULL,
  `icon` varchar(100) DEFAULT 'folder',
  `form` varchar(20) DEFAULT 'circle',
  `OutsideStrokeWidth` int DEFAULT '8',
  `OutsideStrokeColor` varchar(20) DEFAULT '#FFF',
  `InsideStrokeWidth` int DEFAULT '1',
  `InsideStrokeColor` varchar(10) DEFAULT '#DDD',
  `width` int DEFAULT '28',
  `height` int DEFAULT '28',
  `OuterStrokeColor` varchar(10) DEFAULT '#DDD',
  `OutterStrokeWidth` int DEFAULT '1',
  `fontfamily` varchar(30) DEFAULT 'Verdana',
  `fontsize` varchar(2) DEFAULT '12',
  `color` varchar(20) DEFAULT '#25A0D4',
  `graph` tinyint(1) NOT NULL DEFAULT '1',
  `show_graph` tinyint(1) NOT NULL DEFAULT '1',
  `show_graph_contacts` tinyint(1) NOT NULL DEFAULT '0',
  `IconStrokeColor` varchar(200) DEFAULT NULL,
  `IconStrokeWidth` varchar(200) DEFAULT NULL,
  `IconFill` varchar(200) DEFAULT NULL,
  `IconTransform` varchar(200) DEFAULT NULL,
  `IconPathD` text,
  `count` int DEFAULT NULL,
  `last_count_date` varchar(10) DEFAULT NULL,
  `view_all_columns` tinyint(1) DEFAULT '0',
  `show_relations` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`name`),
  KEY `libelle` (`libelle`),
  KEY `icon` (`icon`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `datatype_columns`
--

CREATE TABLE `datatype_columns` (
  `datatype` varchar(200) NOT NULL,
  `column` varchar(200) NOT NULL,
  `libelle` varchar(200) DEFAULT NULL,
  `ordre` int DEFAULT '0',
  `type` varchar(20) NOT NULL DEFAULT 'text',
  `relation` int DEFAULT NULL,
  `min` int DEFAULT '0',
  `max` int DEFAULT NULL,
  `step` int DEFAULT NULL,
  `items` text,
  PRIMARY KEY (`datatype`,`column`),
  KEY `datatype` (`datatype`),
  KEY `column` (`column`),
  KEY `libelle` (`libelle`),
  KEY `ordre` (`ordre`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `email_cglu`
--

CREATE TABLE `email_cglu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(255) DEFAULT NULL,
  `objet` text,
  `corps` text,
  `insert_date` varchar(255) DEFAULT NULL,
  `status` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=latin1;

--
-- Table structure for table `entity`
--

CREATE TABLE `entity` (
  `id` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(600) DEFAULT NULL,
  `description` text,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `type` varchar(100) DEFAULT NULL,
  `risk` tinyint DEFAULT NULL,
  `tome` tinyint DEFAULT NULL,
  `test` varchar(100) DEFAULT NULL,
  `ch_url` varchar(100) DEFAULT NULL,
  `mission` text,
  `adresse` text,
  `ville` varchar(100) DEFAULT NULL,
  `region` varchar(100) DEFAULT NULL,
  `standard` varchar(200) DEFAULT NULL,
  `fax` varchar(100) DEFAULT NULL,
  `site_web` varchar(100) DEFAULT NULL,
  `boite_postal` varchar(100) DEFAULT NULL,
  `logo` varchar(200) DEFAULT NULL,
  `drapeau_droite` varchar(200) DEFAULT NULL,
  `fete_nationale` varchar(255) DEFAULT NULL,
  `autres` text,
  `pays` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `realisation` text,
  `gsm` varchar(100) DEFAULT NULL,
  `paysdaccueil` varchar(100) DEFAULT NULL,
  `effectif` text,
  `capital` varchar(100) DEFAULT NULL,
  `forme_juridique` varchar(100) DEFAULT NULL,
  `date_creation` varchar(100) DEFAULT NULL,
  `activite` text,
  `secteur` text,
  `sous_secteur` text,
  `presentation` text,
  `reference` text,
  `position` varchar(255) DEFAULT NULL,
  `marque_represente` varchar(255) DEFAULT NULL,
  `actionnaires` text,
  `chiffre_affaire` varchar(100) DEFAULT NULL,
  `patente` varchar(100) DEFAULT NULL,
  `rc` varchar(100) DEFAULT NULL,
  `filiales` varchar(255) DEFAULT NULL,
  `resultat_net` varchar(100) DEFAULT NULL,
  `certifications` text,
  `information_complementaire` text,
  `activite_generale_population` text,
  `potentiel_industriel` varchar(255) DEFAULT NULL,
  `potentiel_touristique` text,
  `atout_commune` text,
  `atout_prefecture` text,
  `dernier_fait_marquant` longtext,
  `logo_url` varchar(255) DEFAULT NULL,
  `presentation_generale` text,
  `geographie_climat` text,
  `population_demographie` text,
  `densite` text,
  `administration` text,
  `economie` text,
  `tourisme` text,
  `transport` text,
  `aeroports` text,
  `ports` text,
  `chemin_de_fer` text,
  `enseignement` text,
  `culture` text,
  `festivals_et_moussems` text,
  `etat` text,
  `nombre_iles_autonomes` text,
  `nb_region` text,
  `collectivite_locale` text,
  `gouvernorat` text,
  `district_province` text,
  `comte` text,
  `departement` text,
  `commune` text,
  `prefecture` text,
  `sous_prefecture` text,
  `wilaya` text,
  `ville_independante` text,
  `municipalite` text,
  `chabiyat` text,
  `cercle` text,
  `paroisse` text,
  `village` text,
  `zone_du_gouvernement_local` text,
  `circonscription` text,
  `delegation` text,
  `chefferie` text,
  `chef_lieu` text,
  `co_capital` text,
  `poste` varchar(200) DEFAULT NULL,
  `pays_export` text,
  `keywords` text,
  `ca_export` text,
  `cnss` text,
  `maison_mere` text,
  `groupe` text,
  `marques_commerciales` text,
  `nombre_cooperatives` text,
  `capacite` text,
  `puissance` text,
  `superficie` text,
  `destinction` text,
  `source` varchar(250) DEFAULT NULL,
  `cabinet_etude` text,
  `domaines_competence` text,
  `mission_positionnement` text,
  `recentes_interventions` text,
  `presentation_expertise` text,
  `valeurs_partenaires` text,
  `offres_atouts` text,
  `specialite` varchar(255) DEFAULT NULL,
  `activites` text,
  `rubriques` text,
  `autre` text,
  `population` varchar(255) DEFAULT NULL,
  `nombre_commune` varchar(255) DEFAULT NULL,
  `nombre_douar` varchar(255) DEFAULT NULL,
  `telephone` varchar(255) DEFAULT NULL,
  `code_fiscal` varchar(100) DEFAULT NULL,
  `ice` varchar(100) DEFAULT NULL,
  `code_postal` varchar(100) DEFAULT NULL,
  `chiffres` text,
  `actions` text,
  `objectifs` text,
  `missions` text,
  `boitepostale` varchar(255) DEFAULT NULL,
  `produits` text,
  `typeentreprise` varchar(254) DEFAULT NULL,
  `marches` varchar(254) DEFAULT NULL,
  `l1` varchar(250) DEFAULT NULL,
  `l2` varchar(250) DEFAULT NULL,
  `l3` text,
  `l4` text,
  `l5` text,
  `l6` text,
  `l7` text,
  `l8` text,
  `l9` text,
  `l10` text,
  `l11` text,
  `l12` text,
  `l13` text,
  `l14` text,
  `l15` text,
  `l16` text,
  `l17` text,
  `l18` text,
  `l19` text,
  `u1` varchar(250) DEFAULT NULL,
  `u2` varchar(250) DEFAULT NULL,
  `u3` varchar(250) DEFAULT NULL,
  `u4` varchar(250) DEFAULT NULL,
  `u5` varchar(250) DEFAULT NULL,
  `u6` varchar(250) DEFAULT NULL,
  `u7` varchar(250) DEFAULT NULL,
  `u8` varchar(250) DEFAULT NULL,
  `u9` varchar(250) DEFAULT NULL,
  `u10` varchar(250) DEFAULT NULL,
  `u11` varchar(250) DEFAULT NULL,
  `u12` varchar(250) DEFAULT NULL,
  `u13` varchar(250) DEFAULT NULL,
  `u14` varchar(250) DEFAULT NULL,
  `u15` varchar(250) DEFAULT NULL,
  `u16` varchar(250) DEFAULT NULL,
  `u17` varchar(250) DEFAULT NULL,
  `u18` varchar(250) DEFAULT NULL,
  `u19` varchar(250) DEFAULT NULL,
  `domaines_prioritaires` text,
  `criteres_octroi` text,
  `langue_site` varchar(20) DEFAULT NULL,
  `tomes` varchar(250) DEFAULT NULL,
  `type_entreprise` text,
  `add_to_export` int DEFAULT NULL,
  `add_to_export_env` int DEFAULT NULL,
  `domaine` text,
  `text` text,
  `date` varchar(30) DEFAULT NULL,
  `auteur` varchar(200) DEFAULT NULL,
  `journal` varchar(100) DEFAULT NULL,
  `negative_keywords` varchar(1000) DEFAULT NULL,
  `names_on_the_text` varchar(1000) DEFAULT NULL,
  `wanted_by` blob,
  `sex` blob,
  `dateofbirth` varchar(100) DEFAULT NULL,
  `language` blob,
  `nationality` varchar(200) DEFAULT NULL,
  `physical_description` blob,
  `charges` blob,
  `jurisdiction` blob,
  `incorporation_date` blob,
  `inactivation_date` blob,
  `struckoff_date` blob,
  `status` blob,
  `service_provider` blob,
  `valid_until` blob,
  `name_original_script` varchar(400) DEFAULT NULL,
  `document` text,
  `placeofbirth` varchar(400) DEFAULT NULL,
  `last_day_updated` varchar(20) DEFAULT NULL,
  `list_type` varchar(20) DEFAULT NULL,
  `alias` text,
  `un_list_type` varchar(20) DEFAULT NULL,
  `listed_on` varchar(40) DEFAULT NULL,
  `third_name` varchar(100) DEFAULT NULL,
  `fourth_name` varchar(100) DEFAULT NULL,
  `first_name` varchar(200) DEFAULT NULL,
  `second_name` varchar(150) DEFAULT NULL,
  `comments` text,
  `title` varchar(400) DEFAULT NULL,
  `regim` varchar(40) DEFAULT NULL,
  `regime` text,
  `metropol` text,
  `sub_regime` text,
  `tom` text,
  `cin` text,
  `part` varchar(400) DEFAULT NULL,
  `file` varchar(200) DEFAULT NULL,
  `new_1` varchar(200) DEFAULT NULL,
  `new_2` varchar(200) DEFAULT NULL,
  `new_3` varchar(200) DEFAULT NULL,
  `importer_pk` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `test` (`test`),
  KEY `tome` (`tome`),
  KEY `type` (`type`),
  KEY `tomes` (`tomes`),
  KEY `importer_pk` (`importer_pk`),
  KEY `pays` (`pays`),
  KEY `ville` (`ville`),
  KEY `l1` (`l1`),
  KEY `l1_2` (`l1`),
  KEY `logo` (`logo`),
  KEY `u12` (`u12`),
  FULLTEXT KEY `libelle` (`libelle`)
) ENGINE=MyISAM AUTO_INCREMENT=54697892 DEFAULT CHARSET=utf8mb3;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `ent_sync_insert` AFTER INSERT ON `entity` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(NEW.id) ON DUPLICATE KEY UPDATE entity_id=entity_id;
 insert into log_table(nom_table,actionn,date_action,num_row) values ("entity","add",now(),new.id);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `ent_sync_update` AFTER UPDATE ON `entity` FOR EACH ROW BEGIN 
INSERT INTO entity_sync(entity_id) VALUES(NEW.id) ON DUPLICATE KEY UPDATE entity_id=entity_id;
insert into log_table(nom_table,actionn,date_action,num_row) values ("entity","update",now(),new.id);
end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `ent_sync_delete` AFTER DELETE ON `entity` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(old.id) ON DUPLICATE KEY UPDATE entity_id=entity_id;
END */;;
DELIMITER ;

--
-- Table structure for table `entity_relations`
--

CREATE TABLE `entity_relations` (
  `entity_id_1` int NOT NULL,
  `entity_id_2` int NOT NULL,
  `relation_libelle` varchar(200) NOT NULL,
  `test` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`entity_id_1`,`entity_id_2`,`relation_libelle`),
  KEY `entity_id_1` (`entity_id_1`),
  KEY `entity_id_2` (`entity_id_2`),
  KEY `relation_libelle` (`relation_libelle`),
  KEY `test` (`test`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `entity_relations_insert` AFTER INSERT ON `entity_relations` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(NEW.entity_id_1) ON DUPLICATE KEY UPDATE entity_id=entity_id;
  INSERT INTO entity_sync(entity_id) VALUES(NEW.entity_id_2) ON DUPLICATE KEY UPDATE entity_id=entity_id;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `entity_relations_update` AFTER UPDATE ON `entity_relations` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(NEW.entity_id_1) ON DUPLICATE KEY UPDATE entity_id=entity_id;
  INSERT INTO entity_sync(entity_id) VALUES(NEW.entity_id_2) ON DUPLICATE KEY UPDATE entity_id=entity_id;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `entity_relations_delete` AFTER DELETE ON `entity_relations` FOR EACH ROW BEGIN
  INSERT INTO entity_sync(entity_id) VALUES(old.entity_id_1) ON DUPLICATE KEY UPDATE entity_id=entity_id;
  INSERT INTO entity_sync(entity_id) VALUES(old.entity_id_2) ON DUPLICATE KEY UPDATE entity_id=entity_id;
END */;;
DELIMITER ;

--
-- Table structure for table `entity_sync`
--

CREATE TABLE `entity_sync` (
  `entity_id` bigint NOT NULL,
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `entity_sync` (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `entityshortcuts`
--

CREATE TABLE `entityshortcuts` (
  `entity_id` int NOT NULL,
  `category_id` int NOT NULL,
  `root_id` int NOT NULL,
  `access` varchar(10) NOT NULL DEFAULT 'view',
  `shortcut_source_id` varchar(60) NOT NULL,
  PRIMARY KEY (`entity_id`,`root_id`,`access`,`shortcut_source_id`,`category_id`) USING BTREE,
  KEY `shortcut_source_id` (`shortcut_source_id`),
  KEY `access` (`access`),
  KEY `root_id` (`root_id`),
  KEY `entity_id` (`entity_id`),
  KEY `category_id` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `firstnames`
--

CREATE TABLE `firstnames` (
  `id` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(255) NOT NULL,
  `alphabet` varchar(30) DEFAULT NULL,
  `lang` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `libelle` (`libelle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `fonctionnaire`
--

CREATE TABLE `fonctionnaire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) DEFAULT NULL,
  `nom_ar` varchar(255) DEFAULT NULL,
  `prenom` varchar(255) DEFAULT NULL,
  `prenom_ar` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `date_naissance` varchar(255) DEFAULT NULL,
  `lieu_naissance` varchar(100) DEFAULT NULL,
  `biographie` text,
  `img_perso_url` varchar(255) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `sexe` varchar(255) DEFAULT NULL,
  `test` varchar(200) DEFAULT NULL,
  `ap` varchar(255) DEFAULT NULL,
  `risk` int DEFAULT NULL,
  `fep` smallint DEFAULT '0',
  `mep` smallint DEFAULT '0',
  `epimg` varchar(3000) DEFAULT NULL,
  `country` varchar(185) DEFAULT NULL,
  `original_country_text` text,
  `countries` text,
  `political_position` text,
  `chamber` text,
  `function` text,
  `locationurl` text,
  `active_start_date` varchar(50) DEFAULT NULL,
  `nationality` varchar(190) DEFAULT NULL,
  `institution_type` text,
  `political_region` text,
  `region` text,
  `related_url` text,
  `other_info` text,
  `company` text,
  `parent_company` varchar(205) DEFAULT NULL,
  `political_party` text,
  `city` text,
  `department` text,
  `institution` text,
  `position` varchar(205) DEFAULT NULL,
  `date_of_birth` varchar(50) DEFAULT NULL,
  `original_place_of_birth_text` text,
  `funtion` text,
  `active_end_date` varchar(50) DEFAULT NULL,
  `gender` varchar(30) DEFAULT NULL,
  `given_name` varchar(230) DEFAULT NULL,
  `legislative_period` text,
  `legislature` varchar(225) DEFAULT NULL,
  `party` text,
  `rank` text,
  `original_place_of_residence_text` text,
  `email` text,
  `date_of_death` varchar(50) DEFAULT NULL,
  `national_id` varchar(70) DEFAULT NULL,
  `other_information` varchar(150) DEFAULT NULL,
  `place_of_birth` varchar(160) DEFAULT NULL,
  `family_name` varchar(165) DEFAULT NULL,
  `department_name` text,
  `honorific_title` varchar(245) DEFAULT NULL,
  `address` text,
  `description` text,
  `joined_house_of_lords` varchar(50) DEFAULT NULL,
  `parliamentary_committee` text,
  `public_position` text,
  `telephone` varchar(170) DEFAULT NULL,
  `code` varchar(15) DEFAULT NULL,
  `document` varchar(40) DEFAULT NULL,
  `place_of_residence` varchar(185) DEFAULT NULL,
  `committees` text,
  `county` text,
  `district` varchar(85) DEFAULT NULL,
  `position_of_employment` text,
  `profile` text,
  `fax` varchar(65) DEFAULT NULL,
  `additional_information` varchar(180) DEFAULT NULL,
  `political_group` text,
  `other` varchar(245) DEFAULT NULL,
  `parent_name` varchar(145) DEFAULT NULL,
  `a` varchar(120) DEFAULT NULL,
  `identificator` varchar(10) DEFAULT NULL,
  `sector` varchar(220) DEFAULT NULL,
  `committee` text,
  `factions` text,
  `membership` text,
  `sequential_number` varchar(15) DEFAULT NULL,
  `e_mail` varchar(170) DEFAULT NULL,
  `parliamentary_post` text,
  `age` varchar(10) DEFAULT NULL,
  `type` text,
  `constituencies` varchar(155) DEFAULT NULL,
  `phone` varchar(80) DEFAULT NULL,
  `division` varchar(60) DEFAULT NULL,
  `political_status` text,
  `intitution_type` varchar(190) DEFAULT NULL,
  `insitution_type` varchar(190) DEFAULT NULL,
  `click` text,
  `aliases` text,
  `political_postiion` varchar(160) DEFAULT NULL,
  `org` text,
  `bio` text,
  `notes` text,
  `subcategory` varchar(150) DEFAULT NULL,
  `title` varchar(190) DEFAULT NULL,
  `structured_source_name` varchar(130) DEFAULT NULL,
  `role` text,
  `seniority` varchar(50) DEFAULT NULL,
  `coalition` varchar(195) DEFAULT NULL,
  `governorate` varchar(65) DEFAULT NULL,
  `political_entity` text,
  `institutiton_type` varchar(105) DEFAULT NULL,
  `commission` text,
  `constituency` text,
  `institution_position` varchar(60) DEFAULT NULL,
  `photo` text,
  `ambassadorial_post` text,
  `organization` text,
  `directorio` text,
  `topics_of_interest` text,
  `date_of_ineligibility` varchar(50) DEFAULT NULL,
  `membership_type` varchar(100) DEFAULT NULL,
  `reason_for_ineligibility` varchar(185) DEFAULT NULL,
  `end_date` varchar(50) DEFAULT NULL,
  `start_dates` varchar(50) DEFAULT NULL,
  `chmb` text,
  `current_posts` text,
  `office` varchar(120) DEFAULT NULL,
  `parents` text,
  `parliamentary_career` text,
  `firstname` varchar(75) DEFAULT NULL,
  `lastname` varchar(85) DEFAULT NULL,
  `poltical_position` varchar(160) DEFAULT NULL,
  `institution_ype` varchar(95) DEFAULT NULL,
  `suppl_ant` text,
  `text` text,
  `empresas` text,
  `politica_position` varchar(160) DEFAULT NULL,
  `funciton` varchar(45) DEFAULT NULL,
  `aka` text,
  `political_regon` varchar(120) DEFAULT NULL,
  `details` text,
  `date_of_retirement` varchar(50) DEFAULT NULL,
  `reason_for_retirement` text,
  `cv` text,
  `citizenship` varchar(145) DEFAULT NULL,
  `actrive_start_date` varchar(80) DEFAULT NULL,
  `nsdc_department` varchar(235) DEFAULT NULL,
  `state` varchar(65) DEFAULT NULL,
  `years_active` varchar(55) DEFAULT NULL,
  `yobe` varchar(30) DEFAULT NULL,
  `organisation` varchar(30) DEFAULT NULL,
  `cvurl` text,
  `military_rank` varchar(45) DEFAULT NULL,
  `associaton_type` varchar(30) DEFAULT NULL,
  `info` varchar(95) DEFAULT NULL,
  `united_kingdom` varchar(70) DEFAULT NULL,
  `assicoation_name` varchar(95) DEFAULT NULL,
  `append` varchar(45) DEFAULT NULL,
  `list_of_people` varchar(45) DEFAULT NULL,
  `substitues` varchar(65) DEFAULT NULL,
  `asocciation_type` varchar(30) DEFAULT NULL,
  `continent` varchar(30) DEFAULT NULL,
  `embassy_team` varchar(165) DEFAULT NULL,
  `parish` varchar(85) DEFAULT NULL,
  `autarquias` text,
  `link` text,
  `polical_party` varchar(150) DEFAULT NULL,
  `institution_tyoe` varchar(105) DEFAULT NULL,
  `picture` text,
  `active_sttart_date` varchar(50) DEFAULT NULL,
  `political_political` varchar(15) DEFAULT NULL,
  `politcal_party` varchar(20) DEFAULT NULL,
  `shvabe` varchar(35) DEFAULT NULL,
  `institutional_type` varchar(155) DEFAULT NULL,
  `palce_of_birth` varchar(35) DEFAULT NULL,
  `links` varchar(90) DEFAULT NULL,
  `other_function` varchar(160) DEFAULT NULL,
  `active_strat_date` varchar(80) DEFAULT NULL,
  `missions` text,
  `structure` varchar(115) DEFAULT NULL,
  `date_of_births` varchar(50) DEFAULT NULL,
  `plaec_of_birth` varchar(80) DEFAULT NULL,
  `active_end_day` varchar(50) DEFAULT NULL,
  `active_start_day` varchar(50) DEFAULT NULL,
  `ign` varchar(40) DEFAULT NULL,
  `head_or_officers` varchar(60) DEFAULT NULL,
  `acttive_start_date` varchar(100) DEFAULT NULL,
  `square_level_one` text,
  `associatio_name` varchar(75) DEFAULT NULL,
  `notable_experience` varchar(185) DEFAULT NULL,
  `pdf` text,
  `biography` varchar(245) DEFAULT NULL,
  `public` varchar(135) DEFAULT NULL,
  `lists_to_capture` varchar(95) DEFAULT NULL,
  `associates` text,
  `inatitution_type` varchar(105) DEFAULT NULL,
  `crime` text,
  `poliical_party` varchar(30) DEFAULT NULL,
  `council` varchar(140) DEFAULT NULL,
  `acive_start_date` varchar(75) DEFAULT NULL,
  `place_of_bith` varchar(55) DEFAULT NULL,
  `political` varchar(130) DEFAULT NULL,
  `associtation_name` varchar(125) DEFAULT NULL,
  `org_chamber` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  FULLTEXT KEY `nom_prenom` (`nom`,`prenom`),
  FULLTEXT KEY `nom` (`nom`),
  FULLTEXT KEY `prenom` (`prenom`)
) ENGINE=InnoDB AUTO_INCREMENT=15053275 DEFAULT CHARSET=utf8mb3;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `fonction_after` AFTER INSERT ON `fonctionnaire` FOR EACH ROW BEGIN
 
 insert into log_table(nom_table,actionn,date_action,num_row) values ("Fonctionnaires","add",now(),new.id);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `fonction_after_update` AFTER UPDATE ON `fonctionnaire` FOR EACH ROW BEGIN
 insert into log_table(nom_table,actionn,date_action,num_row) values ("Fonctionnaires","update",now(),new.id);
END */;;
DELIMITER ;

--
-- Table structure for table `fonctionnaire_sync`
--

CREATE TABLE `fonctionnaire_sync` (
  `fonctionnaire_id` bigint NOT NULL,
  PRIMARY KEY (`fonctionnaire_id`),
  UNIQUE KEY `fonctionnaire_sync` (`fonctionnaire_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `keywords`
--

CREATE TABLE `keywords` (
  `keyword` varchar(30) NOT NULL,
  `stat` int NOT NULL DEFAULT '0',
  `counter` int DEFAULT '0',
  PRIMARY KEY (`keyword`),
  UNIQUE KEY `keyword` (`keyword`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `log_table`
--

CREATE TABLE `log_table` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom_table` varchar(255) DEFAULT NULL,
  `actionn` varchar(255) DEFAULT NULL,
  `date_action` datetime DEFAULT NULL,
  `num_row` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2020310 DEFAULT CHARSET=latin1;

--
-- Table structure for table `menu_items`
--

CREATE TABLE `menu_items` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `menu_id` int unsigned DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `target` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '_self',
  `icon_class` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_id` int DEFAULT NULL,
  `order` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `route` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parameters` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `menu_items_menu_id_foreign` (`menu_id`),
  CONSTRAINT `menu_items_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `menus`
--

CREATE TABLE `menus` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `menus_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint unsigned NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint unsigned NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `negative_keywords`
--

CREATE TABLE `negative_keywords` (
  `id` int NOT NULL AUTO_INCREMENT,
  `keyword` varchar(60) NOT NULL DEFAULT '',
  `lang` varchar(10) DEFAULT 'en',
  `alphabet` varchar(20) DEFAULT NULL,
  `risk` tinyint DEFAULT NULL,
  `counter` int DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `keyword` (`keyword`)
) ENGINE=InnoDB AUTO_INCREMENT=244 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `newsletter`
--

CREATE TABLE `newsletter` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(400) DEFAULT NULL,
  `status` tinyint DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3812 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int DEFAULT NULL,
  `layout` varchar(100) DEFAULT NULL,
  `namespace` varchar(50) DEFAULT NULL,
  `name` varchar(300) DEFAULT NULL,
  `position` int NOT NULL,
  `date_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `date_updated` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `parent_id` (`parent_id`),
  KEY `layout` (`layout`),
  KEY `namespace` (`namespace`),
  KEY `name` (`name`(255)),
  KEY `position` (`position`),
  KEY `date_created` (`date_created`),
  KEY `date_updated` (`date_updated`)
) ENGINE=InnoDB AUTO_INCREMENT=343 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `peps_data`
--

CREATE TABLE `peps_data` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `clefs` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `data` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `titles` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ordre` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `permission_role`
--

CREATE TABLE `permission_role` (
  `permission_id` bigint unsigned NOT NULL,
  `role_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `permission_role_permission_id_index` (`permission_id`),
  KEY `permission_role_role_id_index` (`role_id`),
  CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `person_relations`
--

CREATE TABLE `person_relations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `person_id_1` int NOT NULL,
  `person_id_2` int NOT NULL,
  `relation_libelle` varchar(255) NOT NULL,
  `test` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;

--
-- Table structure for table `privilege`
--

CREATE TABLE `privilege` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int NOT NULL,
  `module` varchar(50) NOT NULL,
  `controller` varchar(50) NOT NULL,
  `action` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `role_id` (`role_id`),
  KEY `module` (`module`),
  KEY `controller` (`controller`),
  KEY `action` (`action`)
) ENGINE=InnoDB AUTO_INCREMENT=3754 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `profil`
--

CREATE TABLE `profil` (
  `id` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `libelle_ar` text,
  `test` varchar(200) DEFAULT NULL,
  `libelle_en` varchar(150) DEFAULT NULL,
  `ppe` varchar(3) NOT NULL DEFAULT 'off',
  `count` int DEFAULT NULL,
  `last_count_date` varchar(200) DEFAULT NULL,
  UNIQUE KEY `id_3` (`id`),
  UNIQUE KEY `libelle` (`libelle`,`ppe`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41137 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `registry`
--

CREATE TABLE `registry` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `remote_ip` varchar(200) DEFAULT NULL,
  `logged_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `report`
--

CREATE TABLE `report` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `libelle` varchar(200) DEFAULT NULL,
  `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `id` (`id`),
  KEY `libelle` (`libelle`),
  KEY `date` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `report_items`
--

CREATE TABLE `report_items` (
  `report_id` int NOT NULL,
  `data_id` int NOT NULL,
  `data_type` varchar(30) NOT NULL,
  PRIMARY KEY (`report_id`,`data_id`,`data_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `role`
--

CREATE TABLE `role` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint unsigned NOT NULL,
  `role_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`),
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `roles_admin`
--

CREATE TABLE `roles_admin` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_admin_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `route_visits`
--

CREATE TABLE `route_visits` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `route_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `visit_count` bigint unsigned NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `limit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `soundex`
--

CREATE TABLE `soundex` (
  `keyword` varchar(200) NOT NULL,
  `soundex` varchar(200) NOT NULL,
  `count` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`keyword`),
  KEY `keyword` (`keyword`),
  KEY `count` (`count`),
  KEY `soundex` (`soundex`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tb_abonnements`
--

CREATE TABLE `tb_abonnements` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `account_id` int unsigned NOT NULL,
  `type_abonnement_id` int unsigned NOT NULL,
  `etat` varchar(255) NOT NULL,
  `date_start` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `date_end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `abonnements_type_abonnement_id_foreign` (`type_abonnement_id`),
  KEY `abonnements_account_id_foreign` (`account_id`),
  CONSTRAINT `abonnements_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `tb_accounts` (`id`),
  CONSTRAINT `abonnements_type_abonnement_id_foreign` FOREIGN KEY (`type_abonnement_id`) REFERENCES `tb_type_abonnement` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_accesseur_account`
--

CREATE TABLE `tb_accesseur_account` (
  `account_id` int unsigned NOT NULL,
  `accesseur_id` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `tb_account_trombino`
--

CREATE TABLE `tb_account_trombino` (
  `account_id` int unsigned NOT NULL,
  `trombino_id` int unsigned NOT NULL,
  PRIMARY KEY (`account_id`,`trombino_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `tb_article_article_category`
--

CREATE TABLE `tb_article_article_category` (
  `article_id` int unsigned NOT NULL,
  `articlecategory_id` int unsigned NOT NULL,
  UNIQUE KEY `article_article_category_article_id_articlecategory_id_unique` (`article_id`,`articlecategory_id`),
  KEY `article_article_category_articlecategory_id_foreign` (`articlecategory_id`),
  CONSTRAINT `article_article_category_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `tb_articles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `article_article_category_articlecategory_id_foreign` FOREIGN KEY (`articlecategory_id`) REFERENCES `tb_article_categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_article_categories`
--

CREATE TABLE `tb_article_categories` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL,
  `category_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `article_categories_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_articles`
--

CREATE TABLE `tb_articles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `shortDecs` text NOT NULL,
  `corp` text NOT NULL,
  `photo` varchar(255) NOT NULL DEFAULT 'Default-article.jpg',
  `thumb` varchar(255) NOT NULL DEFAULT 'Default-article.jpg',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articles_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_cities`
--

CREATE TABLE `tb_cities` (
  `id` int NOT NULL AUTO_INCREMENT,
  `country` varchar(5) NOT NULL,
  `name` varchar(600) NOT NULL,
  `lat` double NOT NULL,
  `lng` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=128770 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tb_countries`
--

CREATE TABLE `tb_countries` (
  `id` smallint unsigned NOT NULL AUTO_INCREMENT,
  `code` int NOT NULL,
  `alpha2` varchar(2) NOT NULL,
  `alpha3` varchar(3) NOT NULL,
  `nom_en_gb` varchar(45) NOT NULL,
  `nom_fr_fr` varchar(45) NOT NULL,
  `flag` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `alpha2` (`alpha2`),
  UNIQUE KEY `alpha3` (`alpha3`),
  UNIQUE KEY `code_unique` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tb_faq`
--

CREATE TABLE `tb_faq` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `question` varchar(600) NOT NULL,
  `reponse` text NOT NULL,
  `order` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_illustrations`
--

CREATE TABLE `tb_illustrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `image` varchar(255) NOT NULL,
  `link` varchar(255) DEFAULT NULL,
  `order` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_media`
--

CREATE TABLE `tb_media` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `file_type` varchar(255) NOT NULL,
  `file_extension` varchar(255) NOT NULL,
  `file_size` varchar(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `media_slug_unique` (`slug`),
  UNIQUE KEY `media_url_unique` (`url`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_payments`
--

CREATE TABLE `tb_payments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `account_id` int unsigned NOT NULL,
  `montant` double NOT NULL,
  `date_payment` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `payment_type` varchar(255) NOT NULL,
  `serial_number` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `payments_account_id_foreign` (`account_id`),
  CONSTRAINT `payments_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `tb_accounts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_permission_role`
--

CREATE TABLE `tb_permission_role` (
  `permission_id` int NOT NULL,
  `role_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tb_permissions`
--

CREATE TABLE `tb_permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=622 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_role`
--

CREATE TABLE `tb_role` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_role_user`
--

CREATE TABLE `tb_role_user` (
  `user_id` int unsigned NOT NULL,
  `role_id` int unsigned NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_user_role_id_foreign` (`role_id`),
  CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `tb_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `tb_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_subscribers`
--

CREATE TABLE `tb_subscribers` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(600) DEFAULT NULL,
  `email` varchar(600) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tb_testimonies`
--

CREATE TABLE `tb_testimonies` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `first_name` varchar(200) NOT NULL,
  `last_name` varchar(200) NOT NULL,
  `function` varchar(200) NOT NULL,
  `object` varchar(500) NOT NULL,
  `testinony_text` text NOT NULL,
  `validate` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `first_name` (`first_name`),
  KEY `last_name` (`last_name`),
  KEY `function` (`function`),
  KEY `object` (`object`(255)),
  KEY `validate` (`validate`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `tb_trombinos`
--

CREATE TABLE `tb_trombinos` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;

--
-- Table structure for table `tb_type_abonnement`
--

CREATE TABLE `tb_type_abonnement` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `price` double NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `test_slave`
--

CREATE TABLE `test_slave` (
  `id` int NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `titres`
--

CREATE TABLE `titres` (
  `id` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(255) NOT NULL,
  `alphabet` varchar(30) DEFAULT NULL,
  `lang` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=197 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tracking`
--

CREATE TABLE `tracking` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` varchar(100) DEFAULT NULL,
  `request` varchar(400) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `user_id` (`user_id`),
  KEY `request` (`request`(255)),
  KEY `created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tracking_points`
--

CREATE TABLE `tracking_points` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` varchar(100) DEFAULT NULL,
  `day` varchar(255) NOT NULL,
  `points` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `user_id` (`user_id`),
  KEY `day` (`day`),
  KEY `points` (`points`)
) ENGINE=InnoDB AUTO_INCREMENT=3345 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `tracking_segments`
--

CREATE TABLE `tracking_segments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` varchar(100) DEFAULT NULL,
  `day` varchar(255) NOT NULL,
  `from_time` double NOT NULL DEFAULT '0',
  `to_time` double NOT NULL DEFAULT '0',
  `elapsed` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `user_id` (`user_id`),
  KEY `day` (`day`),
  KEY `from_time` (`from_time`),
  KEY `to_time` (`to_time`),
  KEY `elapsed` (`elapsed`)
) ENGINE=InnoDB AUTO_INCREMENT=15966 DEFAULT CHARSET=utf8mb3;

--
-- Table structure for table `translations`
--

CREATE TABLE `translations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `table_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `column_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `foreign_key` int unsigned NOT NULL,
  `locale` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `translations_table_name_column_name_foreign_key_locale_unique` (`table_name`,`column_name`,`foreign_key`,`locale`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `trombino_components`
--

CREATE TABLE `trombino_components` (
  `id` int NOT NULL AUTO_INCREMENT,
  `domains` varchar(255) DEFAULT NULL,
  `clefs` varchar(255) DEFAULT NULL,
  `data` text,
  `image` varchar(255) DEFAULT NULL,
  `intitule` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1491 DEFAULT CHARSET=latin1;

--
-- Table structure for table `useraccess`
--

CREATE TABLE `useraccess` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `access_id` int NOT NULL,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `user_id` (`user_id`),
  KEY `access_id` (`access_id`),
  KEY `date` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=21361 DEFAULT CHARSET=utf8mb3;


