
-- Table structure for table `email_counter`
--

DROP TABLE IF EXISTS `email_counter`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_counter` (
  `id` int NOT NULL DEFAULT '1',
  `hour_start` timestamp NULL DEFAULT NULL,
  `count` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `email_queue`
--

DROP TABLE IF EXISTS `email_queue`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_queue` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rowid` int NOT NULL DEFAULT '0' COMMENT 'ope_pass.rowid',
  `to_email` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `body` text COLLATE utf8mb4_general_ci,
  `headers` text COLLATE utf8mb4_general_ci,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `status` enum('pending','sent','failed') COLLATE utf8mb4_general_ci DEFAULT 'pending',
  `attempts` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40956 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `medias`
--

DROP TABLE IF EXISTS `medias`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `medias` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `dir0` varchar(75) NOT NULL DEFAULT '',
  `dir1` varchar(150) NOT NULL DEFAULT '',
  `dir2` varchar(45) NOT NULL DEFAULT '',
  `support` varchar(45) NOT NULL DEFAULT '',
  `support_rowid` int NOT NULL DEFAULT '0',
  `fichier` varchar(250) NOT NULL DEFAULT '',
  `type_fichier` varchar(5) NOT NULL DEFAULT 'pdf',
  `description` varchar(100) NOT NULL DEFAULT '',
  `position` char(1) NOT NULL DEFAULT 'd',
  `hauteur` int NOT NULL DEFAULT '0',
  `largeur` int NOT NULL DEFAULT '0',
  `niveaugris` tinyint(1) NOT NULL DEFAULT '0',
  `date_creat` datetime DEFAULT NULL,
  `fk_user_creat` int NOT NULL DEFAULT '0',
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=327 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ope_pass`
--

DROP TABLE IF EXISTS `ope_pass`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_operation` int NOT NULL DEFAULT '0',
  `fk_sector` int DEFAULT '0',
  `fk_user` int NOT NULL DEFAULT '0',
  `fk_adresse` varchar(25) DEFAULT '' COMMENT 'adresses.cp??.id',
  `date_eve` datetime DEFAULT NULL,
  `fk_type` int DEFAULT '0',
  `numero` varchar(10) NOT NULL DEFAULT '',
  `rue` varchar(75) NOT NULL DEFAULT '',
  `rue_bis` varchar(1) NOT NULL DEFAULT '',
  `ville` varchar(75) NOT NULL DEFAULT '',
  `lieudit` varchar(75) DEFAULT '',
  `fk_habitat` int DEFAULT '1',
  `appt` varchar(5) DEFAULT NULL,
  `niveau` varchar(5) DEFAULT NULL,
  `chk_habitat_vide` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'habitat vide (refus)',
  `gps_lat` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `gps_lng` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `libelle` varchar(45) NOT NULL DEFAULT '',
  `montant` decimal(7,2) NOT NULL DEFAULT '0.00',
  `fk_type_reglement` int DEFAULT '1',
  `remarque` text,
  `recu` varchar(50) DEFAULT NULL,
  `email` varchar(75) DEFAULT '',
  `email_erreur` varchar(30) DEFAULT '',
  `chk_email_sent` tinyint(1) NOT NULL DEFAULT '0',
  `phone` varchar(15) NOT NULL DEFAULT '',
  `docremis` tinyint(1) DEFAULT '0',
  `date_repasser` datetime DEFAULT NULL,
  `nb_passages` int DEFAULT '1' COMMENT 'Nb passages pour les a repasser',
  `lot_nb_passages` int DEFAULT '1' COMMENT 'Saisie par lot de passages dans la partie mobile',
  `chk_gps_maj` tinyint(1) DEFAULT '0',
  `chk_map_create` tinyint(1) DEFAULT '0',
  `chk_mobile` tinyint(1) DEFAULT '0',
  `chk_synchro` tinyint(1) DEFAULT '1' COMMENT 'chk synchro entre web et appli',
  `chk_api_adresse` tinyint(1) DEFAULT '0',
  `chk_maj_adresse` tinyint(1) DEFAULT '0',
  `anomalie` tinyint(1) DEFAULT '0',
  `date_creat` datetime DEFAULT NULL,
  `fk_user_creat` int DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`),
  KEY `fk_operation` (`fk_operation`),
  KEY `fk_sector` (`fk_sector`),
  KEY `fk_user` (`fk_user`),
  KEY `fk_type` (`fk_type`),
  KEY `fk_type_reglement` (`fk_type_reglement`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=8367890 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ope_pass_histo`
--

DROP TABLE IF EXISTS `ope_pass_histo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass_histo` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_pass` int DEFAULT NULL,
  `fk_user` int DEFAULT NULL,
  `date_histo` datetime DEFAULT NULL,
  `sujet` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `remarque` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  KEY `ope_pass_histo_fk_pass_IDX` (`fk_pass`) USING BTREE,
  KEY `ope_pass_histo_date_histo_IDX` (`date_histo`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=44274 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ope_pass_recus`
--

DROP TABLE IF EXISTS `ope_pass_recus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass_recus` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_pass` int DEFAULT NULL,
  `chemin` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nom_recu` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `date_recu` datetime DEFAULT NULL,
  `date_creat_recu` datetime DEFAULT NULL,
  `date_sent_recu` datetime DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`),
  KEY `ope_pass_recus_fk_pass_IDX` (`fk_pass`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=140644 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ope_users`
--

DROP TABLE IF EXISTS `ope_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_operation` int NOT NULL DEFAULT '0',
  `fk_user` int NOT NULL DEFAULT '0',
  `date_creat` datetime DEFAULT NULL,
  `fk_user_creat` int DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=199006 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ope_users_sectors`
--

DROP TABLE IF EXISTS `ope_users_sectors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users_sectors` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_operation` int DEFAULT NULL,
  `fk_user` int DEFAULT NULL,
  `fk_sector` int DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid` (`rowid`),
  KEY `fk_operation` (`fk_operation`),
  KEY `fk_user` (`fk_user`),
  KEY `fk_sector` (`fk_sector`)
) ENGINE=InnoDB AUTO_INCREMENT=174364 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ope_users_suivis`
--

DROP TABLE IF EXISTS `ope_users_suivis`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users_suivis` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_operation` int DEFAULT NULL,
  `fk_user` int DEFAULT NULL,
  `date_suivi` datetime DEFAULT NULL,
  `latitude` varchar(20) DEFAULT NULL,
  `longitude` varchar(20) DEFAULT NULL,
  `vitesse` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=2820230 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `operations`
--

DROP TABLE IF EXISTS `operations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operations` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_entite` int DEFAULT '1',
  `libelle` varchar(75) NOT NULL DEFAULT '',
  `date_deb` date DEFAULT NULL,
  `date_fin` date DEFAULT NULL,
  `chk_api_adresse` tinyint(1) DEFAULT '0',
  `chk_distinct_sectors` tinyint(1) DEFAULT '0',
  `date_creat` datetime DEFAULT NULL,
  `fk_user_creat` int DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  KEY `fk_entite` (`fk_entite`),
  KEY `date_deb` (`date_deb`)
) ENGINE=InnoDB AUTO_INCREMENT=3121 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `operations_docs`
--

DROP TABLE IF EXISTS `operations_docs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operations_docs` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_operation` int NOT NULL DEFAULT '0',
  `libelle` varchar(75) NOT NULL DEFAULT '',
  `comment` text NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `operations_eve_docs`
--

DROP TABLE IF EXISTS `operations_eve_docs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operations_eve_docs` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_evenement` int NOT NULL DEFAULT '0',
  `fk_document` int NOT NULL DEFAULT '0',
  `date_creat` datetime DEFAULT NULL,
  `fk_user_creat` int DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `params`
--

DROP TABLE IF EXISTS `params`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `params` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(35) NOT NULL DEFAULT '',
  `valeur` varchar(255) NOT NULL DEFAULT '',
  `aide` varchar(150) NOT NULL DEFAULT '',
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sectors`
--

DROP TABLE IF EXISTS `sectors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sectors` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(75) DEFAULT '',
  `sector` text,
  `color` varchar(7) DEFAULT '#4B77BE',
  `date_creat` datetime DEFAULT NULL,
  `fk_user_creat` int DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=34349 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sectors_adresses`
--

DROP TABLE IF EXISTS `sectors_adresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sectors_adresses` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_adresse` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'adresses.cp??.id',
  `fk_sector` int DEFAULT NULL,
  `numero` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `rue_bis` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `rue` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `cp` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `ville` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gps_lat` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gps_lng` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  KEY `sectors_adresses_fk_sector_index` (`fk_sector`),
  KEY `sectors_adresses_numero_index` (`numero`),
  KEY `sectors_adresses_rue_index` (`rue`),
  KEY `sectors_adresses_ville_index` (`ville`)
) ENGINE=InnoDB AUTO_INCREMENT=24697907 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sectors_streets`
--

DROP TABLE IF EXISTS `sectors_streets`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sectors_streets` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_sector` int DEFAULT NULL,
  `fk_adresse` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'adresses.cp??.id',
  `osm_id` int DEFAULT NULL,
  `osm_lat` varchar(10) DEFAULT NULL,
  `osm_lng` varchar(10) DEFAULT NULL,
  `osm_name` varchar(50) DEFAULT NULL,
  `osm_street` varchar(50) DEFAULT NULL,
  `osm_number` varchar(10) DEFAULT NULL,
  `osm_city` varchar(50) DEFAULT NULL,
  `osm_date_creat` timestamp NULL DEFAULT NULL,
  `date_creat` datetime DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`),
  KEY `fk_sector` (`fk_sector`),
  KEY `osm_lat` (`osm_lat`),
  KEY `osm_lng` (`osm_lng`),
  KEY `osm_name` (`osm_name`),
  KEY `osm_city` (`osm_city`),
  KEY `osm_street` (`osm_street`)
) ENGINE=InnoDB AUTO_INCREMENT=42344357 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `rowid` int unsigned NOT NULL AUTO_INCREMENT,
  `fk_entite` int DEFAULT '1',
  `fk_titre` int DEFAULT '1',
  `num_adherent` int NOT NULL DEFAULT '0',
  `libelle` varchar(91) DEFAULT NULL,
  `libelle_naissance` varchar(90) NOT NULL DEFAULT '',
  `prenom` varchar(45) DEFAULT NULL,
  `nom_tournee` varchar(60) DEFAULT '',
  `username` varchar(50) DEFAULT '',
  `userpass` varchar(60) DEFAULT NULL,
  `userpswd` varchar(60) DEFAULT NULL,
  `josh` tinyint(1) NOT NULL DEFAULT '0',
  `telephone` varchar(15) DEFAULT NULL,
  `mobile` varchar(15) DEFAULT NULL,
  `email` varchar(100) DEFAULT '',
  `email_secondaire` varchar(100) NOT NULL DEFAULT '',
  `fk_role` int DEFAULT '1',
  `infos` varchar(200) NOT NULL DEFAULT '',
  `ltt` varchar(10) DEFAULT '48.08',
  `lng` varchar(10) DEFAULT '-1.68',
  `sector` text,
  `alert_email` tinyint(1) DEFAULT '1',
  `chk_suivi` tinyint(1) DEFAULT '0',
  `date_naissance` date DEFAULT NULL,
  `dept_naissance` varchar(2) NOT NULL DEFAULT '',
  `commune_naissance` varchar(60) NOT NULL DEFAULT '',
  `date_embauche` date DEFAULT NULL,
  `anciennete` varchar(20) DEFAULT '-',
  `fk_categorie` int NOT NULL DEFAULT '0',
  `fk_sous_categorie` int NOT NULL DEFAULT '0',
  `adresse_1` varchar(50) NOT NULL DEFAULT '',
  `adresse_2` varchar(50) NOT NULL DEFAULT '',
  `cp` varchar(5) NOT NULL DEFAULT '',
  `ville` varchar(60) NOT NULL DEFAULT '',
  `matricule` varchar(10) NOT NULL DEFAULT '',
  `fk_grade` int NOT NULL DEFAULT '0',
  `chk_adherent_ud` tinyint(1) NOT NULL DEFAULT '0',
  `chk_adherent_ur` tinyint(1) NOT NULL DEFAULT '0',
  `chk_adherent_fns` tinyint(1) NOT NULL DEFAULT '0',
  `chk_archive` tinyint(1) NOT NULL DEFAULT '0',
  `chk_double_affectation` tinyint(1) NOT NULL DEFAULT '0',
  `fk_user_creat` int DEFAULT NULL,
  `date_creat` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  KEY `fk_entite` (`fk_entite`),
  KEY `libelle` (`libelle`),
  KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=10027744 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `users_entites`
--

DROP TABLE IF EXISTS `users_entites`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users_entites` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `appname` varchar(20) NOT NULL DEFAULT 'geo_sector',
  `http_host` varchar(255) NOT NULL DEFAULT 'admin.geosector.fr adm.geosector.fr mobile.goesector.fr mob.geosector.fr',
  `libelle` varchar(45) DEFAULT '',
  `adresse1` varchar(45) DEFAULT '',
  `adresse2` varchar(45) DEFAULT '',
  `cp` varchar(5) DEFAULT '',
  `ville` varchar(45) DEFAULT '',
  `fk_region` int DEFAULT NULL,
  `fk_type` int DEFAULT '1',
  `tva_intra` varchar(15) DEFAULT '',
  `rcs` varchar(45) DEFAULT '',
  `siret` varchar(17) DEFAULT NULL,
  `ape` varchar(5) DEFAULT '',
  `tel1` varchar(20) DEFAULT '',
  `tel2` varchar(20) DEFAULT '',
  `couleur` varchar(10) DEFAULT '',
  `prefecture` varchar(45) DEFAULT '',
  `fk_titre_gerant` int DEFAULT '1',
  `gerant_prenom` varchar(45) DEFAULT '',
  `gerant_nom` varchar(45) DEFAULT '',
  `email` varchar(45) DEFAULT '',
  `gps_lat` varchar(10) NOT NULL DEFAULT '',
  `gps_lng` varchar(10) NOT NULL DEFAULT '',
  `site_url` varchar(45) DEFAULT '',
  `gerant_signature` varchar(45) DEFAULT '',
  `tampon_signature` varchar(45) DEFAULT '',
  `banque_libelle` varchar(25) DEFAULT '',
  `banque_adresse` varchar(45) DEFAULT '',
  `banque_cp` varchar(5) DEFAULT '',
  `banque_ville` varchar(40) DEFAULT '',
  `iban` varchar(30) DEFAULT '',
  `bic` varchar(15) DEFAULT '',
  `genbase` varchar(45) NOT NULL,
  `groupebase` varchar(45) NOT NULL,
  `userbase` varchar(45) NOT NULL,
  `passbase` varchar(45) NOT NULL,
  `demo` tinyint(1) DEFAULT '0',
  `lib_vert` varchar(25) DEFAULT 'Effectué',
  `lib_verts` varchar(25) DEFAULT 'Effectués',
  `lib_orange` varchar(25) DEFAULT 'A repasser',
  `lib_oranges` varchar(25) DEFAULT 'A repasser',
  `lib_rouge` varchar(25) DEFAULT 'Refusé',
  `lib_rouges` varchar(25) DEFAULT 'Refusés',
  `lib_bleu` varchar(25) DEFAULT 'Autre (Don)',
  `lib_bleus` varchar(25) DEFAULT 'Autres (Dons)',
  `icon_siege` varchar(15) DEFAULT 'fire',
  `icon_siege_color` varchar(15) DEFAULT 'red',
  `btn_width` varchar(3) DEFAULT '100',
  `chk_mdp_manuel` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Gestion des mots de passe manuelle O/N',
  `chk_copie_mail_recu` tinyint(1) NOT NULL DEFAULT '0',
  `chk_accept_sms` tinyint(1) NOT NULL DEFAULT '0',
  `nbmembres` int DEFAULT '0',
  `nbconnex` int DEFAULT '0',
  `date_modif` datetime DEFAULT NULL,
  `fk_user_modif` int DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=1229 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `users_lastpos`
--

DROP TABLE IF EXISTS `users_lastpos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users_lastpos` (
  `fk_user` int NOT NULL,
  `fk_operation` int DEFAULT NULL,
  `gps_lat` varchar(20) DEFAULT NULL,
  `gps_lng` varchar(20) DEFAULT NULL,
  `date_pos` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_civilites`
--

DROP TABLE IF EXISTS `x_civilites`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_civilites` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_departements`
--

DROP TABLE IF EXISTS `x_departements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_departements` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `code` varchar(3) DEFAULT NULL,
  `fk_region` int DEFAULT '1',
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_devises`
--

DROP TABLE IF EXISTS `x_devises`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_devises` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `code` varchar(3) DEFAULT NULL,
  `symbole` varchar(6) DEFAULT NULL,
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_entites_types`
--

DROP TABLE IF EXISTS `x_entites_types`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_entites_types` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_pays`
--

DROP TABLE IF EXISTS `x_pays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_pays` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `code` varchar(3) DEFAULT NULL,
  `fk_continent` int DEFAULT NULL,
  `fk_devise` int DEFAULT '1',
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Table des pays avec leurs codes';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_regions`
--

DROP TABLE IF EXISTS `x_regions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_regions` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_pays` int DEFAULT '1',
  `libelle` varchar(45) DEFAULT NULL,
  `libelle_long` varchar(45) DEFAULT NULL,
  `table_osm` varchar(45) DEFAULT NULL,
  `departements` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_types_passages`
--

DROP TABLE IF EXISTS `x_types_passages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_types_passages` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `color_button` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `color_mark` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `color_table` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `chk_active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_types_reglements`
--

DROP TABLE IF EXISTS `x_types_reglements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_types_reglements` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_users_categories`
--

DROP TABLE IF EXISTS `x_users_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_categories` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(30) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`),
  KEY `x_users_categories__libelle` (`libelle`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_users_grades`
--

DROP TABLE IF EXISTS `x_users_grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_grades` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(90) NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`),
  KEY `x_users_grades__libelle` (`libelle`)
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_users_roles`
--

DROP TABLE IF EXISTS `x_users_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_roles` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(45) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Les différents rôles des utilisateurs';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_users_sous_categories`
--

DROP TABLE IF EXISTS `x_users_sous_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_sous_categories` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_user_categorie` int NOT NULL,
  `libelle` varchar(40) NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`),
  KEY `x_users_sous_categories__libelle` (`libelle`),
  KEY `x_users_sous_categories_fk_user_categorie_index` (`fk_user_categorie`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `x_villes`
--

DROP TABLE IF EXISTS `x_villes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_villes` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_departement` int DEFAULT '1',
  `libelle` varchar(65) DEFAULT NULL,
  `cp` varchar(5) DEFAULT NULL,
  `code_insee` varchar(5) DEFAULT NULL,
  `departement` varchar(65) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=38950 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `y_conf`
--

DROP TABLE IF EXISTS `y_conf`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `y_conf` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `admin` tinyint(1) NOT NULL DEFAULT '0',
  `appenv` varchar(5) NOT NULL DEFAULT 'dev',
  `apptitle` varchar(75) NOT NULL DEFAULT '',
  `appversion` varchar(20) NOT NULL DEFAULT '0.5 du 15/01/2016',
  `appscript` varchar(25) NOT NULL DEFAULT 'login' COMMENT 'Script à appeler si la session ne reconnaît pas l''utilisateur',
  `appicon` varchar(25) NOT NULL DEFAULT 'favicon.png',
  `pathimg` varchar(45) NOT NULL DEFAULT '/files/img',
  `pathupload` varchar(45) NOT NULL DEFAULT '/files/upload',
  `brandgroupe` varchar(45) NOT NULL DEFAULT '',
  `brandmulti` tinyint(1) DEFAULT '0',
  `date_maintenance` datetime DEFAULT NULL,
  `date_renouvellement` date DEFAULT NULL,
  `piwikid` varchar(45) DEFAULT '0',
  `googlid` varchar(45) DEFAULT '0',
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `y_menus`
--

DROP TABLE IF EXISTS `y_menus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `y_menus` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `type_menu` varchar(3) NOT NULL DEFAULT 'mnu' COMMENT '"mnu" pour le menu en header, "bar" pour la barre à gauche, "sdb" pour la sidebar à gauche',
  `admin` tinyint DEFAULT '0' COMMENT '0 Public, 1 Admin, 2 Mobile',
  `only_type_entite` varchar(45) DEFAULT '',
  `only_fk_entite` varchar(45) DEFAULT '',
  `only_fk_role` varchar(45) DEFAULT '',
  `divider_before` tinyint(1) DEFAULT '0',
  `ordre` tinyint DEFAULT '0',
  `fk_parent` int DEFAULT '0',
  `libelle` varchar(45) DEFAULT '',
  `icone` varchar(45) DEFAULT '',
  `color` varchar(35) DEFAULT '',
  `back-color` varchar(35) DEFAULT '',
  `title` varchar(75) DEFAULT '',
  `script` varchar(45) NOT NULL COMMENT 'Une page php acceuil ou une function javascript js:nomfonction ou l''appel à l''id d''un bouton btn:btnNoteRapide\n',
  `script_command` varchar(45) DEFAULT '',
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`),
  KEY `type_menu` (`type_menu`),
  KEY `script` (`script`),
  KEY `ordre` (`ordre`),
  KEY `fk_parent` (`fk_parent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `y_modules`
--

DROP TABLE IF EXISTS `y_modules`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `y_modules` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_parent` int DEFAULT '0',
  `ordre` int DEFAULT '0',
  `libelle` varchar(45) NOT NULL,
  `tip` varchar(150) DEFAULT '',
  `description` text,
  `script` varchar(20) DEFAULT '',
  `couleur` varchar(7) DEFAULT '#bcbcbc',
  `icone` varchar(30) DEFAULT NULL,
  `taille_tuile` int DEFAULT '70' COMMENT 'Taille de la tuile dans l''interface admin',
  `admin` tinyint(1) DEFAULT '1',
  `active` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `y_modules_rules`
--

DROP TABLE IF EXISTS `y_modules_rules`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `y_modules_rules` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `fk_module` int DEFAULT '0',
  `libelle` varchar(30) NOT NULL DEFAULT '',
  `tip` varchar(250) NOT NULL DEFAULT '',
  `val_default` varchar(20) NOT NULL DEFAULT '' COMMENT 'Valeur par défaut prise si la valeur d''un CE n''est pas renseignée',
  `ce_apa` varchar(20) DEFAULT '',
  `ce_csfouest` varchar(20) DEFAULT '',
  `ce_demo` varchar(20) DEFAULT '',
  `ce_natixis` varchar(20) DEFAULT '',
  `ce_purina` varchar(20) DEFAULT '',
  `ce_tfn44` varchar(20) DEFAULT '',
  `ce_webasto` varchar(20) DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `y_modules_regles_rowid_uindex` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `y_pages`
--

DROP TABLE IF EXISTS `y_pages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `y_pages` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(45) DEFAULT NULL,
  `titre` varchar(75) DEFAULT NULL,
  `tooltip` varchar(45) DEFAULT NULL,
  `description` varchar(200) DEFAULT NULL,
  `keywords` varchar(200) DEFAULT NULL,
  `script` varchar(45) DEFAULT NULL,
  `enmaintenance` tinyint(1) DEFAULT '0' COMMENT '0 libre d''accès, 1 en maintenance mais accès aux données, 2 en maintenance sans accès aux données',
  `admin` tinyint(1) DEFAULT '0',
  `mail` tinyint(1) DEFAULT '0',
  `admtools` tinyint(1) DEFAULT '0',
  `magazine` tinyint(1) DEFAULT '0',
  `files` tinyint(1) DEFAULT '1',
  `maps` tinyint(1) DEFAULT '0',
  `editor` tinyint(1) DEFAULT '0',
  `jqui` tinyint(1) DEFAULT '0',
  `form` tinyint(1) DEFAULT '0',
  `sidebar` tinyint(1) DEFAULT '0',
  `chart` tinyint(1) DEFAULT '0',
  `agenda` tinyint(1) DEFAULT '0',
  `scheduler` tinyint(1) DEFAULT '0',
  `osm` tinyint(1) DEFAULT '0',
  `zz` tinyint(1) DEFAULT '0',
  `maintenance` tinyint(1) DEFAULT '0',
  `layout` varchar(45) DEFAULT 'default.php',
  `active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`),
  KEY `script` (`script`),
  KEY `admin` (`admin`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `z_logs`
--

DROP TABLE IF EXISTS `z_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `z_logs` (
  `date` datetime NOT NULL,
  `ip` varchar(15) NOT NULL,
  `host` varchar(50) NOT NULL,
  `adrhost` varchar(50) NOT NULL,
  `infos` varchar(200) DEFAULT '',
  `fk_user` int DEFAULT '0',
  `page` varchar(200) NOT NULL,
  `commentaire` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Table des logs';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `z_sessions`
--

DROP TABLE IF EXISTS `z_sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `z_sessions` (
  `sid` text NOT NULL,
  `fk_user` int NOT NULL,
  `role` varchar(10) DEFAULT NULL,
  `date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `ip` varchar(50) NOT NULL,
  `browser` varchar(150) NOT NULL,
  `data` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `z_stats`
--

DROP TABLE IF EXISTS `z_stats`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `z_stats` (
  `rowid` int NOT NULL AUTO_INCREMENT,
  `libelle` varchar(75) DEFAULT NULL,
  `fk_user` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `ip` varchar(15) DEFAULT NULL,
  `browser` varchar(75) DEFAULT NULL,
  `origine` varchar(45) DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=210793 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping routines for database 'geosector'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2025-03-28  9:04:32
