SET NAMES utf8;
SET time_zone = '+00:00';

SET NAMES utf8mb4;

DROP TABLE IF EXISTS `_associations`;
CREATE TABLE `_associations` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `association_id` varchar(16) NOT NULL,
  `id_ex` varchar(16) NOT NULL,
  `siret` varchar(16) NOT NULL,
  `gestion` varchar(8) NOT NULL,
  `date_creation` date NOT NULL,
  `date_publication` date NOT NULL,
  `nature` varchar(8) NOT NULL,
  `groupement` varchar(8) NOT NULL,
  `titre` varchar(512) NOT NULL,
  `objet` text NOT NULL,
  `objet_social1` text NOT NULL,
  `objet_social2` text NOT NULL,
  `ori_adresse1` varchar(256) NOT NULL,
  `ori_adresse2` varchar(256) NOT NULL,
  `ori_adresse` varchar(256) NOT NULL,
  `ori_code_postal` varchar(8) NOT NULL,
  `ori_ville` varchar(128) NOT NULL,
  `ori_adresse_code_insee` varchar(8) NOT NULL,
  `dir_civilite` varchar(8) NOT NULL,
  `siteweb` varchar(128) NOT NULL,
  `observation` text NOT NULL,
  `position` varchar(16) NOT NULL,
  `rup_mi` varchar(16) NOT NULL,
  `date_maj` datetime NOT NULL,
  `_adresse_label` varchar(512) NOT NULL,
  `_adresse_score` float NOT NULL,
  `_adresse_numero` varchar(16) NOT NULL,
  `_adresse_type` varchar(32) NOT NULL,
  `_adresse_nom` varchar(512) NOT NULL,
  `_adresse_code_postal` varchar(8) NOT NULL,
  `_adresse_code_insee` varchar(8) NOT NULL,
  `_adresse_ville` varchar(128) NOT NULL,
  `_adresse_rue` varchar(128) NOT NULL,
  `_adresse_context` varchar(256) NOT NULL,
  `latitude` varchar(200) NOT NULL,
  `longitude` varchar(200) NOT NULL,
  `_adresse_datagouv_url` varchar(512) NOT NULL,
  `_adresse_region_id` int(11) NOT NULL,
  `_adresse_departement_id` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
