-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 05 nov. 2024 à 16:47
-- Version du serveur : 8.2.0
-- Version de PHP : 8.0.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de données : `renfortimmo`
--

-- --------------------------------------------------------

--
-- Structure de la table `access`
--

DROP TABLE IF EXISTS `access`;
CREATE TABLE IF NOT EXISTS `access` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `disponibilite` tinyint(1) DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_6692B548A2D8B41` (`terrain_id`),
  KEY `IDX_6692B54C54C8C93` (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `accompte`
--

DROP TABLE IF EXISTS `accompte`;
CREATE TABLE IF NOT EXISTS `accompte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `prix` decimal(10,0) NOT NULL,
  `date` date NOT NULL,
  `payer` tinyint(1) NOT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_BD09DAF741DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_int_notaire`
--

DROP TABLE IF EXISTS `act_int_notaire`;
CREATE TABLE IF NOT EXISTS `act_int_notaire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_E7C229EE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_int_proprio`
--

DROP TABLE IF EXISTS `act_int_proprio`;
CREATE TABLE IF NOT EXISTS `act_int_proprio` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C96E27448A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_int_voisin`
--

DROP TABLE IF EXISTS `act_int_voisin`;
CREATE TABLE IF NOT EXISTS `act_int_voisin` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_333BBDA88A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_rdv_hypotheque`
--

DROP TABLE IF EXISTS `act_rdv_hypotheque`;
CREATE TABLE IF NOT EXISTS `act_rdv_hypotheque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_3BF55D6E8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `adresse`
--

DROP TABLE IF EXISTS `adresse`;
CREATE TABLE IF NOT EXISTS `adresse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `contact_id` int DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  `rue` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `code_postal` int DEFAULT NULL,
  `ville` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `departement` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `region` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pays` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `facturation` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C35F0816F6203804` (`statut_id`),
  KEY `IDX_C35F0816E7A1254A` (`contact_id`),
  KEY `IDX_C35F0816A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `analyse`
--

DROP TABLE IF EXISTS `analyse`;
CREATE TABLE IF NOT EXISTS `analyse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `titre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `observations` longtext COLLATE utf8mb4_unicode_ci,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `appels_recus`
--

DROP TABLE IF EXISTS `appels_recus`;
CREATE TABLE IF NOT EXISTS `appels_recus` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `date` datetime NOT NULL,
  `objet` longtext COLLATE utf8mb4_unicode_ci,
  `appeller` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2F9E5C3AE7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `aspect_exterieur`
--

DROP TABLE IF EXISTS `aspect_exterieur`;
CREATE TABLE IF NOT EXISTS `aspect_exterieur` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8214C4838A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `bati_environant`
--

DROP TABLE IF EXISTS `bati_environant`;
CREATE TABLE IF NOT EXISTS `bati_environant` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `immeubles` tinyint(1) DEFAULT NULL,
  `maison_individuelle` tinyint(1) DEFAULT NULL,
  `locaux_dactivite` tinyint(1) DEFAULT NULL,
  `mixte` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BC456AFD8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `caract_gene_zone`
--

DROP TABLE IF EXISTS `caract_gene_zone`;
CREATE TABLE IF NOT EXISTS `caract_gene_zone` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_9EEE76B68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `caract_terrain`
--

DROP TABLE IF EXISTS `caract_terrain`;
CREATE TABLE IF NOT EXISTS `caract_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `distance` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `ces`
--

DROP TABLE IF EXISTS `ces`;
CREATE TABLE IF NOT EXISTS `ces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ces_max` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6456130F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `classement_terrain`
--

DROP TABLE IF EXISTS `classement_terrain`;
CREATE TABLE IF NOT EXISTS `classement_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `zonage` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `extrait_plan_zonage_joint` tinyint(1) DEFAULT NULL,
  `terrain_soumis_aop` tinyint(1) DEFAULT NULL,
  `nom_terrain_soumis_oap` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `extrait_oap_joint` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_A5722A138A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `commande_bornage`
--

DROP TABLE IF EXISTS `commande_bornage`;
CREATE TABLE IF NOT EXISTS `commande_bornage` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_88C6B7A28A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `communication`
--

DROP TABLE IF EXISTS `communication`;
CREATE TABLE IF NOT EXISTS `communication` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  `statut_id` int NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `forfait` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_F9AFB5EBD2235D39` (`tache_id`),
  KEY `IDX_F9AFB5EBF6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_remarque`
--

DROP TABLE IF EXISTS `concl_remarque`;
CREATE TABLE IF NOT EXISTS `concl_remarque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_BAB73CEA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_risque`
--

DROP TABLE IF EXISTS `concl_risque`;
CREATE TABLE IF NOT EXISTS `concl_risque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_saitpas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8ECD13E68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_servitude_prive`
--

DROP TABLE IF EXISTS `concl_servitude_prive`;
CREATE TABLE IF NOT EXISTS `concl_servitude_prive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_737D559A8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_servitude_publique`
--

DROP TABLE IF EXISTS `concl_servitude_publique`;
CREATE TABLE IF NOT EXISTS `concl_servitude_publique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_13F8A4028A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `contact`
--

DROP TABLE IF EXISTS `contact`;
CREATE TABLE IF NOT EXISTS `contact` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int DEFAULT NULL,
  `origine_id` int DEFAULT NULL,
  `priorite_id` int DEFAULT NULL,
  `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entreprise` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `poste` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `agence` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `service` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `profession` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  `site_web` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4C62E638F6203804` (`statut_id`),
  KEY `IDX_4C62E63887998E` (`origine_id`),
  KEY `IDX_4C62E63853B4F1DE` (`priorite_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `contact_architect`
--

DROP TABLE IF EXISTS `contact_architect`;
CREATE TABLE IF NOT EXISTS `contact_architect` (
  `id` int NOT NULL AUTO_INCREMENT,
  `entreprise` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `profession` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `contenance_bornage`
--

DROP TABLE IF EXISTS `contenance_bornage`;
CREATE TABLE IF NOT EXISTS `contenance_bornage` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `bornage_en_cour` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_44DF503A8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `contenance_cadastrale`
--

DROP TABLE IF EXISTS `contenance_cadastrale`;
CREATE TABLE IF NOT EXISTS `contenance_cadastrale` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8E3E2678A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `cours_eau_terrain`
--

DROP TABLE IF EXISTS `cours_eau_terrain`;
CREATE TABLE IF NOT EXISTS `cours_eau_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `cours_deau` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_55BE6F798A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `cour_eau_limite_terrain`
--

DROP TABLE IF EXISTS `cour_eau_limite_terrain`;
CREATE TABLE IF NOT EXISTS `cour_eau_limite_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `metres` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_2A2ACB328A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `demenbrement_prop`
--

DROP TABLE IF EXISTS `demenbrement_prop`;
CREATE TABLE IF NOT EXISTS `demenbrement_prop` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D7DCF5968A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `densite`
--

DROP TABLE IF EXISTS `densite`;
CREATE TABLE IF NOT EXISTS `densite` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `deplacement`
--

DROP TABLE IF EXISTS `deplacement`;
CREATE TABLE IF NOT EXISTS `deplacement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `statut_id` int DEFAULT NULL,
  `lieu` longtext COLLATE utf8mb4_unicode_ci,
  `date` datetime DEFAULT NULL,
  `duree` time DEFAULT NULL,
  `cout` decimal(10,2) DEFAULT NULL,
  `cout_peage` decimal(10,2) DEFAULT NULL,
  `cout_carburant` decimal(10,2) DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `payer` tinyint(1) NOT NULL,
  `kilometrage_depart` decimal(10,0) DEFAULT NULL,
  `kilometrage_arrive` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_1296FAC2D2235D39` (`tache_id`),
  KEY `IDX_1296FAC2F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis`
--

DROP TABLE IF EXISTS `devis`;
CREATE TABLE IF NOT EXISTS `devis` (
  `id` int NOT NULL AUTO_INCREMENT,
  `projet_id` int DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8B27C52BC18272` (`projet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `doctrine_migration_versions`
--

DROP TABLE IF EXISTS `doctrine_migration_versions`;
CREATE TABLE IF NOT EXISTS `doctrine_migration_versions` (
  `version` varchar(191) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `executed_at` datetime DEFAULT NULL,
  `execution_time` int DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `document`
--

DROP TABLE IF EXISTS `document`;
CREATE TABLE IF NOT EXISTS `document` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `name` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cout_achat_document` decimal(10,2) DEFAULT NULL,
  `cout_document_commande` decimal(10,2) DEFAULT NULL,
  `cout_document_produit` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  `file` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D8698A76D2235D39` (`tache_id`),
  KEY `IDX_D8698A76E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `doc_local_urbanisme`
--

DROP TABLE IF EXISTS `doc_local_urbanisme`;
CREATE TABLE IF NOT EXISTS `doc_local_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `date_approbation` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  `version_consulte` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_consultation` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  `remarques` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B0D9BF9D8A2D8B41` (`terrain_id`),
  KEY `IDX_B0D9BF9DC54C8C93` (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `email`
--

DROP TABLE IF EXISTS `email`;
CREATE TABLE IF NOT EXISTS `email` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `statut_id` int DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E7927C74E7A1254A` (`contact_id`),
  KEY `IDX_E7927C74F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `entreprise`
--

DROP TABLE IF EXISTS `entreprise`;
CREATE TABLE IF NOT EXISTS `entreprise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `raison_sociale` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `siret` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `naf` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D19FA60F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `environement`
--

DROP TABLE IF EXISTS `environement`;
CREATE TABLE IF NOT EXISTS `environement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `env_de_type_id` int DEFAULT NULL,
  `bati_environant_id` int DEFAULT NULL,
  `env_perimetre_id` int DEFAULT NULL,
  `env_nuisances_sonores_id` int DEFAULT NULL,
  `env_reseaux_transport_id` int DEFAULT NULL,
  `env_com_serv_id` int DEFAULT NULL,
  `env_equipement_public_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `autres_nuisances` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_19F04B86173F91FD` (`env_de_type_id`),
  KEY `IDX_19F04B8642F9133D` (`bati_environant_id`),
  KEY `IDX_19F04B862F35B472` (`env_perimetre_id`),
  KEY `IDX_19F04B86F932F33C` (`env_nuisances_sonores_id`),
  KEY `IDX_19F04B86503E9859` (`env_reseaux_transport_id`),
  KEY `IDX_19F04B86ACDD68CD` (`env_com_serv_id`),
  KEY `IDX_19F04B86950E4556` (`env_equipement_public_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_autre_nuisances`
--

DROP TABLE IF EXISTS `env_autre_nuisances`;
CREATE TABLE IF NOT EXISTS `env_autre_nuisances` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_BD47D8BB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_commerces`
--

DROP TABLE IF EXISTS `env_commerces`;
CREATE TABLE IF NOT EXISTS `env_commerces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `rayon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `commerceproximite` tinyint(1) DEFAULT NULL,
  `epicerie_supermarche_marche` tinyint(1) DEFAULT NULL,
  `cafe_restau_bar` tinyint(1) DEFAULT NULL,
  `banque_dab` tinyint(1) DEFAULT NULL,
  `station_service` tinyint(1) DEFAULT NULL,
  `poste` tinyint(1) DEFAULT NULL,
  `pharmacie` tinyint(1) DEFAULT NULL,
  `medecin_maison_medicaleprofessions` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BA9EB14C8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_com_serv`
--

DROP TABLE IF EXISTS `env_com_serv`;
CREATE TABLE IF NOT EXISTS `env_com_serv` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` longtext COLLATE utf8mb4_unicode_ci,
  `rayon` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_de_type`
--

DROP TABLE IF EXISTS `env_de_type`;
CREATE TABLE IF NOT EXISTS `env_de_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `urbain` tinyint(1) DEFAULT NULL,
  `peri_urbain` tinyint(1) DEFAULT NULL,
  `rural` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BA8CC2508A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_equipement_public`
--

DROP TABLE IF EXISTS `env_equipement_public`;
CREATE TABLE IF NOT EXISTS `env_equipement_public` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `statut` longtext COLLATE utf8mb4_unicode_ci,
  `rayon` longtext COLLATE utf8mb4_unicode_ci,
  `creche_ecole_collegue_lycee` tinyint(1) DEFAULT NULL,
  `bibliotheque` tinyint(1) DEFAULT NULL,
  `maisondes_associations` tinyint(1) DEFAULT NULL,
  `equipement_sportifs` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BA7F9EA78A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_nuisances_sonores`
--

DROP TABLE IF EXISTS `env_nuisances_sonores`;
CREATE TABLE IF NOT EXISTS `env_nuisances_sonores` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `chemin_de_fer` tinyint(1) DEFAULT NULL,
  `metre_chemain_de_fer` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `autoroute` tinyint(1) DEFAULT NULL,
  `metre_autoroute` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `aeroport` tinyint(1) DEFAULT NULL,
  `metre_aeroport` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activite_industrielle` tinyint(1) DEFAULT NULL,
  `metre_actind` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_654D71ED8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_observation`
--

DROP TABLE IF EXISTS `env_observation`;
CREATE TABLE IF NOT EXISTS `env_observation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_1B232E0E8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_perimetre`
--

DROP TABLE IF EXISTS `env_perimetre`;
CREATE TABLE IF NOT EXISTS `env_perimetre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `de_lotissement` tinyint(1) DEFAULT NULL,
  `de_zac` tinyint(1) DEFAULT NULL,
  `zone_parc_activite` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_A194DDD48A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_reseaux_transport`
--

DROP TABLE IF EXISTS `env_reseaux_transport`;
CREATE TABLE IF NOT EXISTS `env_reseaux_transport` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `reseau_tranport_en_commun` tinyint(1) DEFAULT NULL,
  `metre_transport_commun` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `piste_cyclable` tinyint(1) DEFAULT NULL,
  `metre_cyclable` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `princ_axes_routiers` tinyint(1) DEFAULT NULL,
  `metre_axe_routier` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gare` tinyint(1) DEFAULT NULL,
  `metre_gare` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `aeroport` tinyint(1) DEFAULT NULL,
  `metre_aeroport` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_11AE42B08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `espace_libre`
--

DROP TABLE IF EXISTS `espace_libre`;
CREATE TABLE IF NOT EXISTS `espace_libre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_1AE934EA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `etat`
--

DROP TABLE IF EXISTS `etat`;
CREATE TABLE IF NOT EXISTS `etat` (
  `id` int NOT NULL AUTO_INCREMENT,
  `etat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `etat_des_lieux`
--

DROP TABLE IF EXISTS `etat_des_lieux`;
CREATE TABLE IF NOT EXISTS `etat_des_lieux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `created_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_F7210312F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `forfait`
--

DROP TABLE IF EXISTS `forfait`;
CREATE TABLE IF NOT EXISTS `forfait` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `prix` decimal(10,2) NOT NULL,
  `date` datetime NOT NULL,
  `payer` tinyint(1) NOT NULL,
  `date_reglement` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BBB5C482D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `haut_max_const`
--

DROP TABLE IF EXISTS `haut_max_const`;
CREATE TABLE IF NOT EXISTS `haut_max_const` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `gabarit_max` tinyint(1) DEFAULT NULL,
  `hauteur_max` tinyint(1) DEFAULT NULL,
  `r` decimal(10,0) DEFAULT NULL,
  `h_max` decimal(10,0) DEFAULT NULL,
  `a_legout` tinyint(1) DEFAULT NULL,
  `faitage` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_388190198A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `hebergement`
--

DROP TABLE IF EXISTS `hebergement`;
CREATE TABLE IF NOT EXISTS `hebergement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `nuit` int NOT NULL,
  `cout_nuit_unitaire` decimal(5,2) NOT NULL,
  `lieu` longtext COLLATE utf8mb4_unicode_ci,
  `date` date NOT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4852DD9CD2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `historique`
--

DROP TABLE IF EXISTS `historique`;
CREATE TABLE IF NOT EXISTS `historique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  `projet_id` int DEFAULT NULL,
  `historique` longtext COLLATE utf8mb4_unicode_ci,
  `title` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  PRIMARY KEY (`id`),
  KEY `IDX_EDBFD5ECE7A1254A` (`contact_id`),
  KEY `IDX_EDBFD5ECA4AEAFEA` (`entreprise_id`),
  KEY `IDX_EDBFD5ECC18272` (`projet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `identification`
--

DROP TABLE IF EXISTS `identification`;
CREATE TABLE IF NOT EXISTS `identification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `identification` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `ident_coord_props`
--

DROP TABLE IF EXISTS `ident_coord_props`;
CREATE TABLE IF NOT EXISTS `ident_coord_props` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `proprietaire` tinyint(1) DEFAULT NULL,
  `usufruitier` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_AF99E9FDE7A1254A` (`contact_id`),
  KEY `IDX_AF99E9FD8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `implantation_domaine_public`
--

DROP TABLE IF EXISTS `implantation_domaine_public`;
CREATE TABLE IF NOT EXISTS `implantation_domaine_public` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `implantation_limite` tinyint(1) DEFAULT NULL,
  `implantation_retrait` tinyint(1) DEFAULT NULL,
  `recul_min` decimal(10,0) DEFAULT NULL,
  `exeptions` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_33D1D9DD8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `implantation_lim_separatives`
--

DROP TABLE IF EXISTS `implantation_lim_separatives`;
CREATE TABLE IF NOT EXISTS `implantation_lim_separatives` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `implantation_limite` tinyint(1) DEFAULT NULL,
  `implantation_retrait` tinyint(1) DEFAULT NULL,
  `recul` decimal(10,0) DEFAULT NULL,
  `exeption` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_7D2373268A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `implantation_propriete`
--

DROP TABLE IF EXISTS `implantation_propriete`;
CREATE TABLE IF NOT EXISTS `implantation_propriete` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `non_reg` tinyint(1) DEFAULT NULL,
  `reglemente` tinyint(1) DEFAULT NULL,
  `precisez` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_FE59F5D68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `info_plus`
--

DROP TABLE IF EXISTS `info_plus`;
CREATE TABLE IF NOT EXISTS `info_plus` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_C999327FE7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `intervenant`
--

DROP TABLE IF EXISTS `intervenant`;
CREATE TABLE IF NOT EXISTS `intervenant` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `statut_id` int NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `cout` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `realisations` longtext COLLATE utf8mb4_unicode_ci,
  `duree` time DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_73D0145CD2235D39` (`tache_id`),
  KEY `IDX_73D0145CF6203804` (`statut_id`),
  KEY `IDX_73D0145CA4AEAFEA` (`entreprise_id`),
  KEY `IDX_73D0145CE7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `liste_annexes_consulte`
--

DROP TABLE IF EXISTS `liste_annexes_consulte`;
CREATE TABLE IF NOT EXISTS `liste_annexes_consulte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `doc_local_urbanisme_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B36D206EFD83624` (`doc_local_urbanisme_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `mail`
--

DROP TABLE IF EXISTS `mail`;
CREATE TABLE IF NOT EXISTS `mail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `contact_id` int NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `objet` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  PRIMARY KEY (`id`),
  KEY `IDX_5126AC48F6203804` (`statut_id`),
  KEY `IDX_5126AC48E7A1254A` (`contact_id`),
  KEY `IDX_5126AC48A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `messenger_messages`
--

DROP TABLE IF EXISTS `messenger_messages`;
CREATE TABLE IF NOT EXISTS `messenger_messages` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `body` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `headers` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue_name` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `available_at` datetime NOT NULL,
  `delivered_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_75EA56E0FB7336F0` (`queue_name`),
  KEY `IDX_75EA56E0E3BD61CE` (`available_at`),
  KEY `IDX_75EA56E016BA31DB` (`delivered_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `mission`
--

DROP TABLE IF EXISTS `mission`;
CREATE TABLE IF NOT EXISTS `mission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `projet_id` int DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `detail` longtext COLLATE utf8mb4_unicode_ci,
  `autre_type` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_9067F23CC18272` (`projet_id`),
  KEY `IDX_9067F23CC54C8C93` (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `moyen`
--

DROP TABLE IF EXISTS `moyen`;
CREATE TABLE IF NOT EXISTS `moyen` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2D6523D6D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `note`
--

DROP TABLE IF EXISTS `note`;
CREATE TABLE IF NOT EXISTS `note` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  `note` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_CFBDFA14E7A1254A` (`contact_id`),
  KEY `IDX_CFBDFA14A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `observation_eau_terrain`
--

DROP TABLE IF EXISTS `observation_eau_terrain`;
CREATE TABLE IF NOT EXISTS `observation_eau_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_245862D68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `observation_vegetation_terrain`
--

DROP TABLE IF EXISTS `observation_vegetation_terrain`;
CREATE TABLE IF NOT EXISTS `observation_vegetation_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8EF494138A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `occupation_terrain`
--

DROP TABLE IF EXISTS `occupation_terrain`;
CREATE TABLE IF NOT EXISTS `occupation_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `terrain_bati` tinyint(1) DEFAULT NULL,
  `nombre_nature_const` longtext COLLATE utf8mb4_unicode_ci,
  `construction_plan_cadastrale` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2B0C386B8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `ouverture_dossier`
--

DROP TABLE IF EXISTS `ouverture_dossier`;
CREATE TABLE IF NOT EXISTS `ouverture_dossier` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4F94D6EB41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `pente5`
--

DROP TABLE IF EXISTS `pente5`;
CREATE TABLE IF NOT EXISTS `pente5` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2D0A4F228A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `pieces_jointes_relief`
--

DROP TABLE IF EXISTS `pieces_jointes_relief`;
CREATE TABLE IF NOT EXISTS `pieces_jointes_relief` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `plan_topographique` tinyint(1) DEFAULT NULL,
  `releve_almetrique` tinyint(1) DEFAULT NULL,
  `carte_ign` tinyint(1) DEFAULT NULL,
  `plan_cadastre` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E7FD3E38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `piece_consulte`
--

DROP TABLE IF EXISTS `piece_consulte`;
CREATE TABLE IF NOT EXISTS `piece_consulte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `rapport_presentation` tinyint(1) DEFAULT NULL,
  `padd` tinyint(1) DEFAULT NULL,
  `oap` tinyint(1) DEFAULT NULL,
  `plan_zonage` tinyint(1) DEFAULT NULL,
  `reg_ecrit` tinyint(1) DEFAULT NULL,
  `liste` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_95E194288A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `piece_jointe_serv_prive`
--

DROP TABLE IF EXISTS `piece_jointe_serv_prive`;
CREATE TABLE IF NOT EXISTS `piece_jointe_serv_prive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `etat_des_servitudes` tinyint(1) DEFAULT NULL,
  `plan_serv_existantes` tinyint(1) DEFAULT NULL,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_C9E547708A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `plan_bornage_joint`
--

DROP TABLE IF EXISTS `plan_bornage_joint`;
CREATE TABLE IF NOT EXISTS `plan_bornage_joint` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `statut` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_B2CB77138A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `plan_cadastre`
--

DROP TABLE IF EXISTS `plan_cadastre`;
CREATE TABLE IF NOT EXISTS `plan_cadastre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `statut` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_25765AF68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `priorite`
--

DROP TABLE IF EXISTS `priorite`;
CREATE TABLE IF NOT EXISTS `priorite` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `profession`
--

DROP TABLE IF EXISTS `profession`;
CREATE TABLE IF NOT EXISTS `profession` (
  `id` int NOT NULL AUTO_INCREMENT,
  `entreprise_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `profession` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `employeur` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BA930D69A4AEAFEA` (`entreprise_id`),
  KEY `IDX_BA930D69E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `projet`
--

DROP TABLE IF EXISTS `projet`;
CREATE TABLE IF NOT EXISTS `projet` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_id` int DEFAULT NULL,
  `priorite_id` int DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `origine_id` int DEFAULT NULL,
  `name` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_50159CA9C54C8C93` (`type_id`),
  KEY `IDX_50159CA953B4F1DE` (`priorite_id`),
  KEY `IDX_50159CA98A2D8B41` (`terrain_id`),
  KEY `IDX_50159CA987998E` (`origine_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_evacuation_eaux_usees`
--

DROP TABLE IF EXISTS `raccordement_evacuation_eaux_usees`;
CREATE TABLE IF NOT EXISTS `raccordement_evacuation_eaux_usees` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6CFC4E4B8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_reseaux_eau`
--

DROP TABLE IF EXISTS `raccordement_reseaux_eau`;
CREATE TABLE IF NOT EXISTS `raccordement_reseaux_eau` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DA1406FE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_reseau_electrique`
--

DROP TABLE IF EXISTS `raccordement_reseau_electrique`;
CREATE TABLE IF NOT EXISTS `raccordement_reseau_electrique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DDC29B468A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_reseau_gaz`
--

DROP TABLE IF EXISTS `raccordement_reseau_gaz`;
CREATE TABLE IF NOT EXISTS `raccordement_reseau_gaz` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8240717F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_tel`
--

DROP TABLE IF EXISTS `raccordement_tel`;
CREATE TABLE IF NOT EXISTS `raccordement_tel` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reference_cadastrale`
--

DROP TABLE IF EXISTS `reference_cadastrale`;
CREATE TABLE IF NOT EXISTS `reference_cadastrale` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `prefixe` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `section` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `numero` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_426BDFA18A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reglement_zone_joint`
--

DROP TABLE IF EXISTS `reglement_zone_joint`;
CREATE TABLE IF NOT EXISTS `reglement_zone_joint` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_AADF24BE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `relief_terrain`
--

DROP TABLE IF EXISTS `relief_terrain`;
CREATE TABLE IF NOT EXISTS `relief_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `terrain_en_pente` tinyint(1) DEFAULT NULL,
  `pente_reguliere` tinyint(1) DEFAULT NULL,
  `plateau` tinyint(1) DEFAULT NULL,
  `talus` tinyint(1) DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_E0CB4E98A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rendez_vous_architecte`
--

DROP TABLE IF EXISTS `rendez_vous_architecte`;
CREATE TABLE IF NOT EXISTS `rendez_vous_architecte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_D0F7B5898A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rendez_vous_hypotheque`
--

DROP TABLE IF EXISTS `rendez_vous_hypotheque`;
CREATE TABLE IF NOT EXISTS `rendez_vous_hypotheque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_85C525418A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rendez_vous_serv_urb`
--

DROP TABLE IF EXISTS `rendez_vous_serv_urb`;
CREATE TABLE IF NOT EXISTS `rendez_vous_serv_urb` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_39FF7F918A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reseau_observation`
--

DROP TABLE IF EXISTS `reseau_observation`;
CREATE TABLE IF NOT EXISTS `reseau_observation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_FDEC793E8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reseau_telephone_fibre`
--

DROP TABLE IF EXISTS `reseau_telephone_fibre`;
CREATE TABLE IF NOT EXISTS `reseau_telephone_fibre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_saitpas` tinyint(1) DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_ADCF20198A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `restauration`
--

DROP TABLE IF EXISTS `restauration`;
CREATE TABLE IF NOT EXISTS `restauration` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `cout_repas_personnel` decimal(10,0) DEFAULT NULL,
  `cout_repas_clients` decimal(10,2) DEFAULT NULL,
  `duree` time DEFAULT NULL,
  `forfait` decimal(10,2) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `etablissement` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_898B1EF1D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reunion`
--

DROP TABLE IF EXISTS `reunion`;
CREATE TABLE IF NOT EXISTS `reunion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  `objet` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` date DEFAULT NULL,
  `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cout_location_salle` decimal(10,2) DEFAULT NULL,
  `cout_location_materiel` decimal(10,2) DEFAULT NULL,
  `cout_restauration` decimal(10,2) DEFAULT NULL,
  `cout_collation` decimal(10,2) DEFAULT NULL,
  `duree` time DEFAULT NULL,
  `forfait_horaire` decimal(10,2) DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_5B00A482D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_pieces_jointe`
--

DROP TABLE IF EXISTS `servitude_pieces_jointe`;
CREATE TABLE IF NOT EXISTS `servitude_pieces_jointe` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `servitude_publique` tinyint(1) DEFAULT NULL,
  `emplacement_reserve` tinyint(1) DEFAULT NULL,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B3E089AB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_prive`
--

DROP TABLE IF EXISTS `servitude_prive`;
CREATE TABLE IF NOT EXISTS `servitude_prive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_FCF4F0998A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_prive_creer`
--

DROP TABLE IF EXISTS `servitude_prive_creer`;
CREATE TABLE IF NOT EXISTS `servitude_prive_creer` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `oui_content` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7CA4E4A08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_publique`
--

DROP TABLE IF EXISTS `servitude_publique`;
CREATE TABLE IF NOT EXISTS `servitude_publique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `alignement` tinyint(1) DEFAULT NULL,
  `servitude_eau_gaz` tinyint(1) DEFAULT NULL,
  `servitude_degagement` tinyint(1) DEFAULT NULL,
  `servitude_monument_historique` tinyint(1) DEFAULT NULL,
  `servitude_marche_pied` tinyint(1) DEFAULT NULL,
  `autre` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_56AA69FC8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_urbanisme`
--

DROP TABLE IF EXISTS `servitude_urbanisme`;
CREATE TABLE IF NOT EXISTS `servitude_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `marge_de_recul` tinyint(1) DEFAULT NULL,
  `recul_content` longtext COLLATE utf8mb4_unicode_ci,
  `emplacement_reserve` tinyint(1) DEFAULT NULL,
  `emplacement_content` longtext COLLATE utf8mb4_unicode_ci,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_4C9264568A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `sta2_roues`
--

DROP TABLE IF EXISTS `sta2_roues`;
CREATE TABLE IF NOT EXISTS `sta2_roues` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_EE352B6D8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `stade_terrain`
--

DROP TABLE IF EXISTS `stade_terrain`;
CREATE TABLE IF NOT EXISTS `stade_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_adresse`
--

DROP TABLE IF EXISTS `statut_adresse`;
CREATE TABLE IF NOT EXISTS `statut_adresse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_communication`
--

DROP TABLE IF EXISTS `statut_communication`;
CREATE TABLE IF NOT EXISTS `statut_communication` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_contact`
--

DROP TABLE IF EXISTS `statut_contact`;
CREATE TABLE IF NOT EXISTS `statut_contact` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_deplacement`
--

DROP TABLE IF EXISTS `statut_deplacement`;
CREATE TABLE IF NOT EXISTS `statut_deplacement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_email`
--

DROP TABLE IF EXISTS `statut_email`;
CREATE TABLE IF NOT EXISTS `statut_email` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_entreprise`
--

DROP TABLE IF EXISTS `statut_entreprise`;
CREATE TABLE IF NOT EXISTS `statut_entreprise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_etat_des_lieux`
--

DROP TABLE IF EXISTS `statut_etat_des_lieux`;
CREATE TABLE IF NOT EXISTS `statut_etat_des_lieux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_intervenant`
--

DROP TABLE IF EXISTS `statut_intervenant`;
CREATE TABLE IF NOT EXISTS `statut_intervenant` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_mail`
--

DROP TABLE IF EXISTS `statut_mail`;
CREATE TABLE IF NOT EXISTS `statut_mail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_tache`
--

DROP TABLE IF EXISTS `statut_tache`;
CREATE TABLE IF NOT EXISTS `statut_tache` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_telephone`
--

DROP TABLE IF EXISTS `statut_telephone`;
CREATE TABLE IF NOT EXISTS `statut_telephone` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `sta_automobile`
--

DROP TABLE IF EXISTS `sta_automobile`;
CREATE TABLE IF NOT EXISTS `sta_automobile` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_390D383F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `tache`
--

DROP TABLE IF EXISTS `tache`;
CREATE TABLE IF NOT EXISTS `tache` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `owner_id` int DEFAULT NULL,
  `mission_id` int DEFAULT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_93872075F6203804` (`statut_id`),
  KEY `IDX_938720757E3C61F9` (`owner_id`),
  KEY `IDX_93872075BE6CAE90` (`mission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `telephone`
--

DROP TABLE IF EXISTS `telephone`;
CREATE TABLE IF NOT EXISTS `telephone` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_450FF010F6203804` (`statut_id`),
  KEY `IDX_450FF010A4AEAFEA` (`entreprise_id`),
  KEY `IDX_450FF010E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `terrain`
--

DROP TABLE IF EXISTS `terrain`;
CREATE TABLE IF NOT EXISTS `terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `stade_id` int DEFAULT NULL,
  `origine_id` int DEFAULT NULL,
  `commune` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code_postal` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `adress` longtext COLLATE utf8mb4_unicode_ci,
  `name` varchar(300) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remarque` longtext COLLATE utf8mb4_unicode_ci,
  `autre_stade` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C87653B16538AB43` (`stade_id`),
  KEY `IDX_C87653B187998E` (`origine_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `terrain_reg_const`
--

DROP TABLE IF EXISTS `terrain_reg_const`;
CREATE TABLE IF NOT EXISTS `terrain_reg_const` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `remarque` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_4DC07FCB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `terrain_viabilise`
--

DROP TABLE IF EXISTS `terrain_viabilise`;
CREATE TABLE IF NOT EXISTS `terrain_viabilise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_AB4D9BF98A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `trace_deau`
--

DROP TABLE IF EXISTS `trace_deau`;
CREATE TABLE IF NOT EXISTS `trace_deau` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `sol_humide` tinyint(1) DEFAULT NULL,
  `difference_vegetation` tinyint(1) DEFAULT NULL,
  `puit` tinyint(1) DEFAULT NULL,
  `metre` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_20C920A38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type`
--

DROP TABLE IF EXISTS `type`;
CREATE TABLE IF NOT EXISTS `type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type_doc_urbanisme`
--

DROP TABLE IF EXISTS `type_doc_urbanisme`;
CREATE TABLE IF NOT EXISTS `type_doc_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type_mission`
--

DROP TABLE IF EXISTS `type_mission`;
CREATE TABLE IF NOT EXISTS `type_mission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type_projet`
--

DROP TABLE IF EXISTS `type_projet`;
CREATE TABLE IF NOT EXISTS `type_projet` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type_proprietaire`
--

DROP TABLE IF EXISTS `type_proprietaire`;
CREATE TABLE IF NOT EXISTS `type_proprietaire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `prop_unique` tinyint(1) DEFAULT NULL,
  `indivision_copropriete` tinyint(1) DEFAULT NULL,
  `societe` tinyint(1) DEFAULT NULL,
  `personne_publique` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_EEA023D38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type_voie_acces`
--

DROP TABLE IF EXISTS `type_voie_acces`;
CREATE TABLE IF NOT EXISTS `type_voie_acces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `user`
--

DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `roles` json NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reset_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_8D93D649E7927C74` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `vegetation`
--

DROP TABLE IF EXISTS `vegetation`;
CREATE TABLE IF NOT EXISTS `vegetation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `densite_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `grand_arbres` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D25C7EDB8A2D8B41` (`terrain_id`),
  KEY `IDX_D25C7EDB83C27326` (`densite_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `verif_cadastre`
--

DROP TABLE IF EXISTS `verif_cadastre`;
CREATE TABLE IF NOT EXISTS `verif_cadastre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C0117DA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_acces`
--

DROP TABLE IF EXISTS `zone_acces`;
CREATE TABLE IF NOT EXISTS `zone_acces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_76DA94B68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_cara_cterrain`
--

DROP TABLE IF EXISTS `zone_cara_cterrain`;
CREATE TABLE IF NOT EXISTS `zone_cara_cterrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `reglemente` tinyint(1) DEFAULT NULL,
  `non_reglemente` tinyint(1) DEFAULT NULL,
  `distance` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2E44B2C58A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_cond_part`
--

DROP TABLE IF EXISTS `zone_cond_part`;
CREATE TABLE IF NOT EXISTS `zone_cond_part` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_9E5EC5998A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_oblig_mixite_fonct`
--

DROP TABLE IF EXISTS `zone_oblig_mixite_fonct`;
CREATE TABLE IF NOT EXISTS `zone_oblig_mixite_fonct` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_saitpas` tinyint(1) DEFAULT NULL,
  `pourcentage` decimal(5,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DF3C94D28A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_oblig_mixite_sociale`
--

DROP TABLE IF EXISTS `zone_oblig_mixite_sociale`;
CREATE TABLE IF NOT EXISTS `zone_oblig_mixite_sociale` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `pourcentage` decimal(10,0) DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_49037A588A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_occup_cond_part`
--

DROP TABLE IF EXISTS `zone_occup_cond_part`;
CREATE TABLE IF NOT EXISTS `zone_occup_cond_part` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_2929C3F08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_occ_util_int`
--

DROP TABLE IF EXISTS `zone_occ_util_int`;
CREATE TABLE IF NOT EXISTS `zone_occ_util_int` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_520ED56D8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_reseaux`
--

DROP TABLE IF EXISTS `zone_reseaux`;
CREATE TABLE IF NOT EXISTS `zone_reseaux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_F79FCB298A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Contraintes pour les tables déchargées
--

--
-- Contraintes pour la table `access`
--
ALTER TABLE `access`
  ADD CONSTRAINT `FK_6692B548A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_6692B54C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_voie_acces` (`id`);

--
-- Contraintes pour la table `accompte`
--
ALTER TABLE `accompte`
  ADD CONSTRAINT `FK_BD09DAF741DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `act_int_notaire`
--
ALTER TABLE `act_int_notaire`
  ADD CONSTRAINT `FK_E7C229EE8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_int_proprio`
--
ALTER TABLE `act_int_proprio`
  ADD CONSTRAINT `FK_C96E27448A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_int_voisin`
--
ALTER TABLE `act_int_voisin`
  ADD CONSTRAINT `FK_333BBDA88A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_rdv_hypotheque`
--
ALTER TABLE `act_rdv_hypotheque`
  ADD CONSTRAINT `FK_3BF55D6E8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `adresse`
--
ALTER TABLE `adresse`
  ADD CONSTRAINT `FK_C35F0816A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_C35F0816E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_C35F0816F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_adresse` (`id`);

--
-- Contraintes pour la table `appels_recus`
--
ALTER TABLE `appels_recus`
  ADD CONSTRAINT `FK_2F9E5C3AE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `aspect_exterieur`
--
ALTER TABLE `aspect_exterieur`
  ADD CONSTRAINT `FK_8214C4838A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `bati_environant`
--
ALTER TABLE `bati_environant`
  ADD CONSTRAINT `FK_BC456AFD8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `caract_gene_zone`
--
ALTER TABLE `caract_gene_zone`
  ADD CONSTRAINT `FK_9EEE76B68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `ces`
--
ALTER TABLE `ces`
  ADD CONSTRAINT `FK_6456130F8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `classement_terrain`
--
ALTER TABLE `classement_terrain`
  ADD CONSTRAINT `FK_A5722A138A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `commande_bornage`
--
ALTER TABLE `commande_bornage`
  ADD CONSTRAINT `FK_88C6B7A28A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `communication`
--
ALTER TABLE `communication`
  ADD CONSTRAINT `FK_F9AFB5EBD2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_F9AFB5EBF6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_communication` (`id`);

--
-- Contraintes pour la table `concl_remarque`
--
ALTER TABLE `concl_remarque`
  ADD CONSTRAINT `FK_BAB73CEA8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `concl_risque`
--
ALTER TABLE `concl_risque`
  ADD CONSTRAINT `FK_8ECD13E68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `concl_servitude_prive`
--
ALTER TABLE `concl_servitude_prive`
  ADD CONSTRAINT `FK_737D559A8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `concl_servitude_publique`
--
ALTER TABLE `concl_servitude_publique`
  ADD CONSTRAINT `FK_13F8A4028A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `contact`
--
ALTER TABLE `contact`
  ADD CONSTRAINT `FK_4C62E63853B4F1DE` FOREIGN KEY (`priorite_id`) REFERENCES `priorite` (`id`),
  ADD CONSTRAINT `FK_4C62E63887998E` FOREIGN KEY (`origine_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_4C62E638F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_contact` (`id`);

--
-- Contraintes pour la table `contenance_bornage`
--
ALTER TABLE `contenance_bornage`
  ADD CONSTRAINT `FK_44DF503A8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `contenance_cadastrale`
--
ALTER TABLE `contenance_cadastrale`
  ADD CONSTRAINT `FK_8E3E2678A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `cours_eau_terrain`
--
ALTER TABLE `cours_eau_terrain`
  ADD CONSTRAINT `FK_55BE6F798A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `cour_eau_limite_terrain`
--
ALTER TABLE `cour_eau_limite_terrain`
  ADD CONSTRAINT `FK_2A2ACB328A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `demenbrement_prop`
--
ALTER TABLE `demenbrement_prop`
  ADD CONSTRAINT `FK_D7DCF5968A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `deplacement`
--
ALTER TABLE `deplacement`
  ADD CONSTRAINT `FK_1296FAC2D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_1296FAC2F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_deplacement` (`id`);

--
-- Contraintes pour la table `devis`
--
ALTER TABLE `devis`
  ADD CONSTRAINT `FK_8B27C52BC18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`);

--
-- Contraintes pour la table `document`
--
ALTER TABLE `document`
  ADD CONSTRAINT `FK_D8698A76D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_D8698A76E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `doc_local_urbanisme`
--
ALTER TABLE `doc_local_urbanisme`
  ADD CONSTRAINT `FK_B0D9BF9D8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_B0D9BF9DC54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_doc_urbanisme` (`id`);

--
-- Contraintes pour la table `email`
--
ALTER TABLE `email`
  ADD CONSTRAINT `FK_E7927C74E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_E7927C74F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_email` (`id`);

--
-- Contraintes pour la table `entreprise`
--
ALTER TABLE `entreprise`
  ADD CONSTRAINT `FK_D19FA60F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_entreprise` (`id`);

--
-- Contraintes pour la table `environement`
--
ALTER TABLE `environement`
  ADD CONSTRAINT `FK_19F04B86173F91FD` FOREIGN KEY (`env_de_type_id`) REFERENCES `env_de_type` (`id`),
  ADD CONSTRAINT `FK_19F04B862F35B472` FOREIGN KEY (`env_perimetre_id`) REFERENCES `env_perimetre` (`id`),
  ADD CONSTRAINT `FK_19F04B8642F9133D` FOREIGN KEY (`bati_environant_id`) REFERENCES `bati_environant` (`id`),
  ADD CONSTRAINT `FK_19F04B86503E9859` FOREIGN KEY (`env_reseaux_transport_id`) REFERENCES `env_reseaux_transport` (`id`),
  ADD CONSTRAINT `FK_19F04B86950E4556` FOREIGN KEY (`env_equipement_public_id`) REFERENCES `env_equipement_public` (`id`),
  ADD CONSTRAINT `FK_19F04B86ACDD68CD` FOREIGN KEY (`env_com_serv_id`) REFERENCES `env_com_serv` (`id`),
  ADD CONSTRAINT `FK_19F04B86F932F33C` FOREIGN KEY (`env_nuisances_sonores_id`) REFERENCES `env_nuisances_sonores` (`id`);

--
-- Contraintes pour la table `env_autre_nuisances`
--
ALTER TABLE `env_autre_nuisances`
  ADD CONSTRAINT `FK_BD47D8BB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_commerces`
--
ALTER TABLE `env_commerces`
  ADD CONSTRAINT `FK_BA9EB14C8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_de_type`
--
ALTER TABLE `env_de_type`
  ADD CONSTRAINT `FK_BA8CC2508A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_equipement_public`
--
ALTER TABLE `env_equipement_public`
  ADD CONSTRAINT `FK_BA7F9EA78A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_nuisances_sonores`
--
ALTER TABLE `env_nuisances_sonores`
  ADD CONSTRAINT `FK_654D71ED8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_observation`
--
ALTER TABLE `env_observation`
  ADD CONSTRAINT `FK_1B232E0E8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_perimetre`
--
ALTER TABLE `env_perimetre`
  ADD CONSTRAINT `FK_A194DDD48A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `env_reseaux_transport`
--
ALTER TABLE `env_reseaux_transport`
  ADD CONSTRAINT `FK_11AE42B08A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `espace_libre`
--
ALTER TABLE `espace_libre`
  ADD CONSTRAINT `FK_1AE934EA8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `etat_des_lieux`
--
ALTER TABLE `etat_des_lieux`
  ADD CONSTRAINT `FK_F7210312F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_etat_des_lieux` (`id`);

--
-- Contraintes pour la table `forfait`
--
ALTER TABLE `forfait`
  ADD CONSTRAINT `FK_BBB5C482D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `haut_max_const`
--
ALTER TABLE `haut_max_const`
  ADD CONSTRAINT `FK_388190198A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `hebergement`
--
ALTER TABLE `hebergement`
  ADD CONSTRAINT `FK_4852DD9CD2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `historique`
--
ALTER TABLE `historique`
  ADD CONSTRAINT `FK_EDBFD5ECA4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_EDBFD5ECC18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`),
  ADD CONSTRAINT `FK_EDBFD5ECE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `ident_coord_props`
--
ALTER TABLE `ident_coord_props`
  ADD CONSTRAINT `FK_AF99E9FD8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_AF99E9FDE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `implantation_domaine_public`
--
ALTER TABLE `implantation_domaine_public`
  ADD CONSTRAINT `FK_33D1D9DD8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `implantation_lim_separatives`
--
ALTER TABLE `implantation_lim_separatives`
  ADD CONSTRAINT `FK_7D2373268A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `implantation_propriete`
--
ALTER TABLE `implantation_propriete`
  ADD CONSTRAINT `FK_FE59F5D68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `info_plus`
--
ALTER TABLE `info_plus`
  ADD CONSTRAINT `FK_C999327FE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `intervenant`
--
ALTER TABLE `intervenant`
  ADD CONSTRAINT `FK_73D0145CA4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_73D0145CD2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_73D0145CE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_73D0145CF6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_intervenant` (`id`);

--
-- Contraintes pour la table `liste_annexes_consulte`
--
ALTER TABLE `liste_annexes_consulte`
  ADD CONSTRAINT `FK_B36D206EFD83624` FOREIGN KEY (`doc_local_urbanisme_id`) REFERENCES `doc_local_urbanisme` (`id`);

--
-- Contraintes pour la table `mail`
--
ALTER TABLE `mail`
  ADD CONSTRAINT `FK_5126AC48A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_5126AC48E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_5126AC48F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_mail` (`id`);

--
-- Contraintes pour la table `mission`
--
ALTER TABLE `mission`
  ADD CONSTRAINT `FK_9067F23CC18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`),
  ADD CONSTRAINT `FK_9067F23CC54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_mission` (`id`);

--
-- Contraintes pour la table `moyen`
--
ALTER TABLE `moyen`
  ADD CONSTRAINT `FK_2D6523D6D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `note`
--
ALTER TABLE `note`
  ADD CONSTRAINT `FK_CFBDFA14A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_CFBDFA14E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `observation_eau_terrain`
--
ALTER TABLE `observation_eau_terrain`
  ADD CONSTRAINT `FK_245862D68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `observation_vegetation_terrain`
--
ALTER TABLE `observation_vegetation_terrain`
  ADD CONSTRAINT `FK_8EF494138A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `occupation_terrain`
--
ALTER TABLE `occupation_terrain`
  ADD CONSTRAINT `FK_2B0C386B8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `ouverture_dossier`
--
ALTER TABLE `ouverture_dossier`
  ADD CONSTRAINT `FK_4F94D6EB41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `pente5`
--
ALTER TABLE `pente5`
  ADD CONSTRAINT `FK_2D0A4F228A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `pieces_jointes_relief`
--
ALTER TABLE `pieces_jointes_relief`
  ADD CONSTRAINT `FK_E7FD3E38A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `piece_consulte`
--
ALTER TABLE `piece_consulte`
  ADD CONSTRAINT `FK_95E194288A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `piece_jointe_serv_prive`
--
ALTER TABLE `piece_jointe_serv_prive`
  ADD CONSTRAINT `FK_C9E547708A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `plan_bornage_joint`
--
ALTER TABLE `plan_bornage_joint`
  ADD CONSTRAINT `FK_B2CB77138A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `plan_cadastre`
--
ALTER TABLE `plan_cadastre`
  ADD CONSTRAINT `FK_25765AF68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `profession`
--
ALTER TABLE `profession`
  ADD CONSTRAINT `FK_BA930D69A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_BA930D69E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `projet`
--
ALTER TABLE `projet`
  ADD CONSTRAINT `FK_50159CA953B4F1DE` FOREIGN KEY (`priorite_id`) REFERENCES `priorite` (`id`),
  ADD CONSTRAINT `FK_50159CA987998E` FOREIGN KEY (`origine_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_50159CA98A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_50159CA9C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_projet` (`id`);

--
-- Contraintes pour la table `raccordement_evacuation_eaux_usees`
--
ALTER TABLE `raccordement_evacuation_eaux_usees`
  ADD CONSTRAINT `FK_6CFC4E4B8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `raccordement_reseaux_eau`
--
ALTER TABLE `raccordement_reseaux_eau`
  ADD CONSTRAINT `FK_DA1406FE8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `raccordement_reseau_electrique`
--
ALTER TABLE `raccordement_reseau_electrique`
  ADD CONSTRAINT `FK_DDC29B468A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `raccordement_reseau_gaz`
--
ALTER TABLE `raccordement_reseau_gaz`
  ADD CONSTRAINT `FK_8240717F8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `reference_cadastrale`
--
ALTER TABLE `reference_cadastrale`
  ADD CONSTRAINT `FK_426BDFA18A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `reglement_zone_joint`
--
ALTER TABLE `reglement_zone_joint`
  ADD CONSTRAINT `FK_AADF24BE8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `relief_terrain`
--
ALTER TABLE `relief_terrain`
  ADD CONSTRAINT `FK_E0CB4E98A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `rendez_vous_architecte`
--
ALTER TABLE `rendez_vous_architecte`
  ADD CONSTRAINT `FK_D0F7B5898A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `rendez_vous_hypotheque`
--
ALTER TABLE `rendez_vous_hypotheque`
  ADD CONSTRAINT `FK_85C525418A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `rendez_vous_serv_urb`
--
ALTER TABLE `rendez_vous_serv_urb`
  ADD CONSTRAINT `FK_39FF7F918A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `reseau_observation`
--
ALTER TABLE `reseau_observation`
  ADD CONSTRAINT `FK_FDEC793E8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `reseau_telephone_fibre`
--
ALTER TABLE `reseau_telephone_fibre`
  ADD CONSTRAINT `FK_ADCF20198A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `restauration`
--
ALTER TABLE `restauration`
  ADD CONSTRAINT `FK_898B1EF1D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `reunion`
--
ALTER TABLE `reunion`
  ADD CONSTRAINT `FK_5B00A482D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `servitude_pieces_jointe`
--
ALTER TABLE `servitude_pieces_jointe`
  ADD CONSTRAINT `FK_B3E089AB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_prive`
--
ALTER TABLE `servitude_prive`
  ADD CONSTRAINT `FK_FCF4F0998A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_prive_creer`
--
ALTER TABLE `servitude_prive_creer`
  ADD CONSTRAINT `FK_7CA4E4A08A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_publique`
--
ALTER TABLE `servitude_publique`
  ADD CONSTRAINT `FK_56AA69FC8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_urbanisme`
--
ALTER TABLE `servitude_urbanisme`
  ADD CONSTRAINT `FK_4C9264568A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `sta2_roues`
--
ALTER TABLE `sta2_roues`
  ADD CONSTRAINT `FK_EE352B6D8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `sta_automobile`
--
ALTER TABLE `sta_automobile`
  ADD CONSTRAINT `FK_390D383F8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `tache`
--
ALTER TABLE `tache`
  ADD CONSTRAINT `FK_938720757E3C61F9` FOREIGN KEY (`owner_id`) REFERENCES `user` (`id`),
  ADD CONSTRAINT `FK_93872075BE6CAE90` FOREIGN KEY (`mission_id`) REFERENCES `mission` (`id`),
  ADD CONSTRAINT `FK_93872075F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_tache` (`id`);

--
-- Contraintes pour la table `telephone`
--
ALTER TABLE `telephone`
  ADD CONSTRAINT `FK_450FF010A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_450FF010E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_450FF010F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_telephone` (`id`);

--
-- Contraintes pour la table `terrain`
--
ALTER TABLE `terrain`
  ADD CONSTRAINT `FK_C87653B16538AB43` FOREIGN KEY (`stade_id`) REFERENCES `stade_terrain` (`id`),
  ADD CONSTRAINT `FK_C87653B187998E` FOREIGN KEY (`origine_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `terrain_reg_const`
--
ALTER TABLE `terrain_reg_const`
  ADD CONSTRAINT `FK_4DC07FCB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `terrain_viabilise`
--
ALTER TABLE `terrain_viabilise`
  ADD CONSTRAINT `FK_AB4D9BF98A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `trace_deau`
--
ALTER TABLE `trace_deau`
  ADD CONSTRAINT `FK_20C920A38A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `type_proprietaire`
--
ALTER TABLE `type_proprietaire`
  ADD CONSTRAINT `FK_EEA023D38A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `vegetation`
--
ALTER TABLE `vegetation`
  ADD CONSTRAINT `FK_D25C7EDB83C27326` FOREIGN KEY (`densite_id`) REFERENCES `densite` (`id`),
  ADD CONSTRAINT `FK_D25C7EDB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `verif_cadastre`
--
ALTER TABLE `verif_cadastre`
  ADD CONSTRAINT `FK_C0117DA8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_acces`
--
ALTER TABLE `zone_acces`
  ADD CONSTRAINT `FK_76DA94B68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_cara_cterrain`
--
ALTER TABLE `zone_cara_cterrain`
  ADD CONSTRAINT `FK_2E44B2C58A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_cond_part`
--
ALTER TABLE `zone_cond_part`
  ADD CONSTRAINT `FK_9E5EC5998A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_oblig_mixite_fonct`
--
ALTER TABLE `zone_oblig_mixite_fonct`
  ADD CONSTRAINT `FK_DF3C94D28A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_oblig_mixite_sociale`
--
ALTER TABLE `zone_oblig_mixite_sociale`
  ADD CONSTRAINT `FK_49037A588A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_occup_cond_part`
--
ALTER TABLE `zone_occup_cond_part`
  ADD CONSTRAINT `FK_2929C3F08A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_occ_util_int`
--
ALTER TABLE `zone_occ_util_int`
  ADD CONSTRAINT `FK_520ED56D8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_reseaux`
--
ALTER TABLE `zone_reseaux`
  ADD CONSTRAINT `FK_F79FCB298A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);
COMMIT;

/*!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 */;
