CREATE TABLE `dossiersProweb` (
  `id` int NOT NULL,
  `exe_ref` year DEFAULT NULL,
  `prest_id` int DEFAULT NULL,
  `prest_lib` varchar(250) NOT NULL,
  `prest_lib2` varchar(250) NOT NULL,
  `catprest_id` int DEFAULT NULL,
  `catprest_lib` varchar(250) NOT NULL,
  `prest_period` varchar(1) NOT NULL,
  `prest_closed` tinyint(1) NOT NULL,
  `doss_id` int NOT NULL,
  `doss_lib` varchar(250) NOT NULL,
  `etdoss_id` int NOT NULL,
  `etdoss_lib` varchar(250) NOT NULL,
  `doss_nb_inscrit` int DEFAULT NULL,
  `od_meyclub_subv` varchar(1) NOT NULL,
  `doss_partce` float DEFAULT NULL,
  `doss_partod` float DEFAULT NULL,
  `doss_montant_total` float DEFAULT NULL,
  `comm_ref` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

ALTER TABLE `dossiersProweb`
  ADD PRIMARY KEY (`id`);
COMMIT;

CREATE TABLE `dossiersProwebExcel` (
  `id` int NOT NULL,
  `json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `nbDossiers` int NOT NULL,
  `md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `dateData` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `cree` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id_user` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

ALTER TABLE `dossiersProwebExcel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `md5` (`md5`),
  ADD KEY `id_user` (`id_user`);

ALTER TABLE `dossiersProwebExcel`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
COMMIT;