-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 09 août 2024 à 13:39
-- Version du serveur : 8.2.0
-- Version de PHP : 8.2.13

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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_6692B548A2D8B41` (`terrain_id`),
  KEY `IDX_6692B54C54C8C93` (`type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `access`
--

INSERT INTO `access` (`id`, `terrain_id`, `type_id`, `disponibilite`, `observation`) VALUES
(6, 6, 1, 0, NULL),
(7, 6, 2, 0, 'azeza');

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_E7C229EE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `act_int_notaire`
--

INSERT INTO `act_int_notaire` (`id`, `terrain_id`, `oui`, `non`, `motif`) VALUES
(2, 7, 1, 0, NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C96E27448A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `act_int_proprio`
--

INSERT INTO `act_int_proprio` (`id`, `terrain_id`, `oui`, `motif`, `non`) VALUES
(1, 6, 1, 'bornes', 0),
(2, 7, 1, NULL, 0);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_333BBDA88A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `act_int_voisin`
--

INSERT INTO `act_int_voisin` (`id`, `terrain_id`, `oui`, `non`, `motif`) VALUES
(2, 7, 1, 0, NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code_postal` int DEFAULT NULL,
  `ville` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `departement` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pays` varchar(255) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `observations` longtext CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8214C4838A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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 AUTO_INCREMENT=8 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_9EEE76B68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `distance` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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 AUTO_INCREMENT=3 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `extrait_plan_zonage_joint` tinyint(1) DEFAULT NULL,
  `terrain_soumis_aop` tinyint(1) DEFAULT NULL,
  `extrait_oap_joint` tinyint(1) DEFAULT NULL,
  `nom_terrain_soumis_oap` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_A5722A138A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 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 AUTO_INCREMENT=4 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 AUTO_INCREMENT=3 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 AUTO_INCREMENT=3 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,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entreprise` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `poste` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `origine` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `agence` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `service` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4C62E638F6203804` (`statut_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `contact`
--

INSERT INTO `contact` (`id`, `statut_id`, `nom`, `prenom`, `entreprise`, `poste`, `origine`, `agence`, `status`, `service`) VALUES
(2, 9, 'Firmin', 'Patrice', 'focus', 'directeur', NULL, NULL, NULL, 'technique'),
(4, 9, 'Patrick', 'Kroon', 'kroon enter', 'Directeur', NULL, NULL, NULL, NULL),
(5, 9, 'CECILE', 'Philippe', 'Renfort immo', 'Secretariat', NULL, 'Toulouse', NULL, 'Administratif');

-- --------------------------------------------------------

--
-- 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,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `bornage_en_cour` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_44DF503A8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `contenance_bornage`
--

INSERT INTO `contenance_bornage` (`id`, `oui`, `non`, `bornage_en_cour`, `ne_sais_pas`, `terrain_id`, `name`) VALUES
(7, 1, 0, 0, 0, 6, NULL),
(8, 1, 0, 0, 0, 6, NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8E3E2678A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `contenance_cadastrale`
--

INSERT INTO `contenance_cadastrale` (`id`, `terrain_id`, `content`) VALUES
(20, 6, 'az-12'),
(22, 7, 'aze');

-- --------------------------------------------------------

--
-- 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 AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_2A2ACB328A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `demenbrement_prop`
--

INSERT INTO `demenbrement_prop` (`id`, `terrain_id`, `oui`) VALUES
(10, 6, 1);

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `densite`
--

INSERT INTO `densite` (`id`, `name`) VALUES
(1, 'Dense'),
(2, 'Peu dense'),
(3, 'Peu dense');

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 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,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` datetime DEFAULT NULL,
  `projet_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8B27C52BC18272` (`projet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `devis`
--

INSERT INTO `devis` (`id`, `name`, `date`, `projet_id`) VALUES
(2, 'Devis 1', '2024-07-30 00:00:00', 4),
(6, 'devis  1.0', '2024-08-01 09:35:00', 3),
(7, 'Paris devis 100', '2024-08-01 14:40:00', 5);

-- --------------------------------------------------------

--
-- Structure de la table `devis_deplacement`
--

DROP TABLE IF EXISTS `devis_deplacement`;
CREATE TABLE IF NOT EXISTS `devis_deplacement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BCF731C341DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_hebergement`
--

DROP TABLE IF EXISTS `devis_hebergement`;
CREATE TABLE IF NOT EXISTS `devis_hebergement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix_unitaire` decimal(5,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E633169D41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_prestation`
--

DROP TABLE IF EXISTS `devis_prestation`;
CREATE TABLE IF NOT EXISTS `devis_prestation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E169C44541DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_restauration`
--

DROP TABLE IF EXISTS `devis_restauration`;
CREATE TABLE IF NOT EXISTS `devis_restauration` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_FE224FAC41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_reunion`
--

DROP TABLE IF EXISTS `devis_reunion`;
CREATE TABLE IF NOT EXISTS `devis_reunion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C9EE3FDE41DEFADA` (`devis_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;

--
-- Déchargement des données de la table `doctrine_migration_versions`
--

INSERT INTO `doctrine_migration_versions` (`version`, `executed_at`, `execution_time`) VALUES
('DoctrineMigrations\\Version20240611081147', '2024-06-20 15:02:24', 19148),
('DoctrineMigrations\\Version20240611082709', '2024-06-20 15:02:43', 299),
('DoctrineMigrations\\Version20240611083124', '2024-06-20 15:02:44', 84),
('DoctrineMigrations\\Version20240611084023', '2024-06-20 15:02:44', 319),
('DoctrineMigrations\\Version20240611084841', '2024-06-20 15:02:44', 86),
('DoctrineMigrations\\Version20240611085141', '2024-06-20 15:02:44', 185),
('DoctrineMigrations\\Version20240611085355', '2024-06-20 15:02:44', 33),
('DoctrineMigrations\\Version20240611091145', '2024-06-20 15:02:44', 211),
('DoctrineMigrations\\Version20240611091730', '2024-06-20 15:02:45', 27),
('DoctrineMigrations\\Version20240611091852', '2024-06-20 15:02:45', 34),
('DoctrineMigrations\\Version20240612070544', '2024-06-20 15:02:45', 29),
('DoctrineMigrations\\Version20240612071015', '2024-06-20 15:02:45', 216),
('DoctrineMigrations\\Version20240612071446', '2024-06-20 15:02:45', 379),
('DoctrineMigrations\\Version20240612074233', '2024-06-20 15:02:45', 200),
('DoctrineMigrations\\Version20240612074824', '2024-06-20 15:02:46', 34),
('DoctrineMigrations\\Version20240612080052', '2024-06-20 15:02:46', 164),
('DoctrineMigrations\\Version20240612080639', '2024-06-20 15:02:46', 30),
('DoctrineMigrations\\Version20240612081423', '2024-06-20 15:02:46', 218),
('DoctrineMigrations\\Version20240612081648', '2024-06-20 15:02:46', 27),
('DoctrineMigrations\\Version20240612082400', '2024-06-20 15:02:46', 34),
('DoctrineMigrations\\Version20240612082616', '2024-06-20 15:02:46', 236),
('DoctrineMigrations\\Version20240612085327', '2024-06-20 15:02:46', 138),
('DoctrineMigrations\\Version20240612085643', '2024-06-20 15:02:46', 190),
('DoctrineMigrations\\Version20240612090535', '2024-06-20 15:02:47', 206),
('DoctrineMigrations\\Version20240612091517', '2024-06-20 15:02:47', 65),
('DoctrineMigrations\\Version20240612092212', '2024-06-20 15:02:47', 205),
('DoctrineMigrations\\Version20240612092603', '2024-06-20 15:02:47', 219),
('DoctrineMigrations\\Version20240612092845', '2024-06-20 15:02:47', 210),
('DoctrineMigrations\\Version20240612093043', '2024-06-20 15:02:48', 187),
('DoctrineMigrations\\Version20240612122316', '2024-06-20 15:02:48', 330),
('DoctrineMigrations\\Version20240612122954', '2024-06-20 15:02:48', 277),
('DoctrineMigrations\\Version20240612124745', '2024-06-20 15:02:48', 167),
('DoctrineMigrations\\Version20240612124911', '2024-06-20 15:02:49', 26),
('DoctrineMigrations\\Version20240612125609', '2024-06-20 15:02:49', 167),
('DoctrineMigrations\\Version20240612130134', '2024-06-20 15:02:49', 37),
('DoctrineMigrations\\Version20240612130548', '2024-06-20 15:02:49', 55),
('DoctrineMigrations\\Version20240612130751', '2024-06-20 15:02:49', 184),
('DoctrineMigrations\\Version20240612131138', '2024-06-20 15:02:49', 164),
('DoctrineMigrations\\Version20240612131614', '2024-06-20 15:02:49', 242),
('DoctrineMigrations\\Version20240612132326', '2024-06-20 15:02:49', 184),
('DoctrineMigrations\\Version20240612132637', '2024-06-20 15:02:50', 219),
('DoctrineMigrations\\Version20240612132826', '2024-06-20 15:02:50', 180),
('DoctrineMigrations\\Version20240612133531', '2024-06-20 15:02:50', 165),
('DoctrineMigrations\\Version20240612134406', '2024-06-20 15:02:50', 194),
('DoctrineMigrations\\Version20240612134612', '2024-06-20 15:02:50', 46),
('DoctrineMigrations\\Version20240612134752', '2024-06-20 15:02:51', 208),
('DoctrineMigrations\\Version20240612135023', '2024-06-20 15:02:51', 36),
('DoctrineMigrations\\Version20240612135135', '2024-06-20 15:02:51', 219),
('DoctrineMigrations\\Version20240612135518', '2024-06-20 15:02:51', 189),
('DoctrineMigrations\\Version20240613071741', '2024-06-20 15:02:51', 238),
('DoctrineMigrations\\Version20240613072152', '2024-06-20 15:02:51', 180),
('DoctrineMigrations\\Version20240613072527', '2024-06-20 15:02:52', 180),
('DoctrineMigrations\\Version20240613073447', '2024-06-20 15:02:52', 219),
('DoctrineMigrations\\Version20240613075457', '2024-06-20 15:02:52', 185),
('DoctrineMigrations\\Version20240613080421', '2024-06-20 15:02:52', 176),
('DoctrineMigrations\\Version20240613081147', '2024-06-20 15:02:52', 158),
('DoctrineMigrations\\Version20240613081539', '2024-06-20 15:02:53', 35),
('DoctrineMigrations\\Version20240613081924', '2024-06-20 15:02:53', 201),
('DoctrineMigrations\\Version20240613082720', '2024-06-20 15:02:53', 191),
('DoctrineMigrations\\Version20240613085431', '2024-06-20 15:02:53', 208),
('DoctrineMigrations\\Version20240613085802', '2024-06-20 15:02:53', 185),
('DoctrineMigrations\\Version20240613090132', '2024-06-20 15:02:53', 168),
('DoctrineMigrations\\Version20240613090318', '2024-06-20 15:02:54', 172),
('DoctrineMigrations\\Version20240613091318', '2024-06-20 15:02:54', 231),
('DoctrineMigrations\\Version20240613092226', '2024-06-20 15:02:54', 400),
('DoctrineMigrations\\Version20240613093126', '2024-06-20 15:02:54', 443),
('DoctrineMigrations\\Version20240613094107', '2024-06-20 15:02:55', 107),
('DoctrineMigrations\\Version20240613110716', '2024-06-20 15:02:55', 164),
('DoctrineMigrations\\Version20240614070845', '2024-06-20 15:02:55', 543),
('DoctrineMigrations\\Version20240614071034', '2024-06-20 15:02:56', 227),
('DoctrineMigrations\\Version20240614071913', '2024-06-20 15:02:56', 166),
('DoctrineMigrations\\Version20240614072757', '2024-06-20 15:02:56', 28),
('DoctrineMigrations\\Version20240614073314', '2024-06-20 15:02:56', 177),
('DoctrineMigrations\\Version20240614074118', '2024-06-20 15:02:56', 211),
('DoctrineMigrations\\Version20240614074730', '2024-06-20 15:02:57', 78),
('DoctrineMigrations\\Version20240614075212', '2024-06-20 15:02:57', 206),
('DoctrineMigrations\\Version20240614080200', '2024-06-20 15:02:57', 132),
('DoctrineMigrations\\Version20240614080353', '2024-06-20 15:02:57', 197),
('DoctrineMigrations\\Version20240614080741', '2024-06-20 15:02:57', 218),
('DoctrineMigrations\\Version20240614082356', '2024-06-20 15:02:57', 272),
('DoctrineMigrations\\Version20240621074154', '2024-06-21 07:42:10', 668),
('DoctrineMigrations\\Version20240621082908', '2024-06-21 08:29:22', 225),
('DoctrineMigrations\\Version20240621085725', '2024-06-21 08:57:43', 59),
('DoctrineMigrations\\Version20240621090301', '2024-06-21 09:03:13', 139),
('DoctrineMigrations\\Version20240621093649', '2024-06-21 09:36:59', 342),
('DoctrineMigrations\\Version20240622093202', '2024-06-22 09:32:12', 631),
('DoctrineMigrations\\Version20240627123122', '2024-06-27 12:31:32', 834),
('DoctrineMigrations\\Version20240628095628', '2024-06-28 09:56:39', 584),
('DoctrineMigrations\\Version20240703091622', '2024-07-03 09:16:30', 185),
('DoctrineMigrations\\Version20240703133451', '2024-07-03 13:35:02', 500),
('DoctrineMigrations\\Version20240704140236', '2024-07-04 14:02:45', 561),
('DoctrineMigrations\\Version20240704140549', '2024-07-04 14:05:56', 232),
('DoctrineMigrations\\Version20240708093526', '2024-07-08 09:35:39', 224),
('DoctrineMigrations\\Version20240708121730', '2024-07-08 12:17:41', 149),
('DoctrineMigrations\\Version20240708144526', '2024-07-08 14:45:35', 288),
('DoctrineMigrations\\Version20240709073747', '2024-07-09 07:37:56', 734),
('DoctrineMigrations\\Version20240709074232', '2024-07-09 07:42:41', 194),
('DoctrineMigrations\\Version20240709074513', '2024-07-09 07:46:37', 256),
('DoctrineMigrations\\Version20240709075319', '2024-07-09 07:53:27', 308),
('DoctrineMigrations\\Version20240709090109', '2024-07-09 09:01:18', 57),
('DoctrineMigrations\\Version20240709124000', '2024-07-09 12:40:10', 377),
('DoctrineMigrations\\Version20240709132221', '2024-07-09 13:22:30', 247),
('DoctrineMigrations\\Version20240710083233', '2024-07-10 08:38:30', 394),
('DoctrineMigrations\\Version20240710093228', '2024-07-10 09:32:36', 258),
('DoctrineMigrations\\Version20240710131125', '2024-07-10 13:11:44', 445),
('DoctrineMigrations\\Version20240710141133', '2024-07-10 14:11:43', 46),
('DoctrineMigrations\\Version20240710141312', '2024-07-10 14:13:20', 215),
('DoctrineMigrations\\Version20240711090003', '2024-07-11 09:00:11', 153),
('DoctrineMigrations\\Version20240711090134', '2024-07-11 09:01:42', 234),
('DoctrineMigrations\\Version20240711100739', '2024-07-11 10:07:49', 135),
('DoctrineMigrations\\Version20240711124313', '2024-07-11 12:44:27', 322),
('DoctrineMigrations\\Version20240711134528', '2024-07-11 13:45:38', 238),
('DoctrineMigrations\\Version20240711140328', '2024-07-11 14:03:36', 318),
('DoctrineMigrations\\Version20240711140824', '2024-07-11 14:08:36', 690),
('DoctrineMigrations\\Version20240711141315', '2024-07-11 14:13:26', 263),
('DoctrineMigrations\\Version20240711141943', '2024-07-11 14:19:57', 296),
('DoctrineMigrations\\Version20240711142126', '2024-07-11 14:21:34', 186),
('DoctrineMigrations\\Version20240711142916', '2024-07-11 14:29:23', 307),
('DoctrineMigrations\\Version20240711143142', '2024-07-11 14:31:51', 174),
('DoctrineMigrations\\Version20240711144558', '2024-07-11 14:46:09', 281),
('DoctrineMigrations\\Version20240711145032', '2024-07-11 14:50:42', 100),
('DoctrineMigrations\\Version20240711145356', '2024-07-11 14:54:02', 234),
('DoctrineMigrations\\Version20240715121342', '2024-07-15 12:13:55', 374),
('DoctrineMigrations\\Version20240716094736', '2024-07-16 09:47:45', 404),
('DoctrineMigrations\\Version20240716124526', '2024-07-16 12:47:11', 163),
('DoctrineMigrations\\Version20240716125050', '2024-07-16 12:51:17', 49),
('DoctrineMigrations\\Version20240717075826', '2024-07-17 07:58:40', 383),
('DoctrineMigrations\\Version20240717084953', '2024-07-17 08:50:02', 73),
('DoctrineMigrations\\Version20240717092048', '2024-07-17 09:20:59', 60),
('DoctrineMigrations\\Version20240717135450', '2024-07-18 05:47:28', 50),
('DoctrineMigrations\\Version20240718054812', '2024-07-18 05:48:21', 15),
('DoctrineMigrations\\Version20240718064130', '2024-07-18 06:41:50', 73),
('DoctrineMigrations\\Version20240718082559', '2024-07-18 08:26:06', 82),
('DoctrineMigrations\\Version20240719085711', '2024-07-19 08:57:18', 138),
('DoctrineMigrations\\Version20240722083732', '2024-07-22 08:37:44', 236),
('DoctrineMigrations\\Version20240722091235', '2024-07-22 09:12:44', 44),
('DoctrineMigrations\\Version20240725095052', '2024-07-25 09:51:03', 376),
('DoctrineMigrations\\Version20240725095515', '2024-07-25 09:55:24', 156),
('DoctrineMigrations\\Version20240725133718', '2024-07-25 13:37:36', 348),
('DoctrineMigrations\\Version20240726085210', '2024-07-26 08:52:22', 271),
('DoctrineMigrations\\Version20240730083408', '2024-07-30 08:34:19', 366),
('DoctrineMigrations\\Version20240730154030', '2024-07-30 15:40:40', 399),
('DoctrineMigrations\\Version20240731072936', '2024-07-31 07:30:03', 347),
('DoctrineMigrations\\Version20240731073806', '2024-07-31 07:38:14', 244),
('DoctrineMigrations\\Version20240731091149', '2024-07-31 09:12:02', 659),
('DoctrineMigrations\\Version20240808112509', '2024-08-08 11:26:17', 651),
('DoctrineMigrations\\Version20240809131502', '2024-08-09 13:15:35', 224),
('DoctrineMigrations\\Version20240809132615', '2024-08-09 13:26:26', 472);

-- --------------------------------------------------------

--
-- 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,
  `name` varchar(500) CHARACTER SET utf8mb4 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,
  PRIMARY KEY (`id`),
  KEY `IDX_D8698A76D2235D39` (`tache_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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_consultation` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  `remarques` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B0D9BF9D8A2D8B41` (`terrain_id`),
  KEY `IDX_B0D9BF9DC54C8C93` (`type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `siret` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `naf` varchar(255) CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `autres_nuisances` longtext CHARACTER SET utf8mb4 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,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BD47D8BB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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) CHARACTER SET utf8mb4 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 AUTO_INCREMENT=6 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `rayon` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_com_serv`
--

INSERT INTO `env_com_serv` (`id`, `statut`, `rayon`) VALUES
(1, 'Commerces de proximité', NULL),
(2, 'Epicerie/supermarché/marché Hebdomadaire', NULL),
(3, 'Café / Restaurant / bar', NULL),
(4, 'Banque / DAB', NULL),
(5, 'Poste', NULL),
(6, 'Pharmacie', NULL),
(7, 'Médecin / maison médicale /professions médicales et parapharmacies', NULL);

-- --------------------------------------------------------

--
-- 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 AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_de_type`
--

INSERT INTO `env_de_type` (`id`, `terrain_id`, `urbain`, `peri_urbain`, `rural`) VALUES
(7, 6, 1, 0, 0);

-- --------------------------------------------------------

--
-- 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,
  `statut` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `rayon` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `terrain_id` int DEFAULT NULL,
  `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 AUTO_INCREMENT=10 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `autoroute` tinyint(1) DEFAULT NULL,
  `metre_autoroute` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `aeroport` tinyint(1) DEFAULT NULL,
  `metre_aeroport` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activite_industrielle` tinyint(1) DEFAULT NULL,
  `metre_actind` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_654D71ED8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 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 CHARACTER SET utf8mb4 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 AUTO_INCREMENT=10 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `piste_cyclable` tinyint(1) DEFAULT NULL,
  `metre_cyclable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `princ_axes_routiers` tinyint(1) DEFAULT NULL,
  `metre_axe_routier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gare` tinyint(1) DEFAULT NULL,
  `metre_gare` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `aeroport` tinyint(1) DEFAULT NULL,
  `metre_aeroport` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_11AE42B08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_1AE934EA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `etat`
--

INSERT INTO `etat` (`id`, `etat`) VALUES
(1, 'à construire'),
(2, 'à rénover'),
(3, 'à détruire'),
(4, 'à trouver'),
(5, 'à acheter'),
(6, 'à vendre');

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 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 AUTO_INCREMENT=4 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 CHARACTER SET utf8mb4 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,
  `historique` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  `projet_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_EDBFD5ECE7A1254A` (`contact_id`),
  KEY `IDX_EDBFD5ECA4AEAFEA` (`entreprise_id`),
  KEY `IDX_EDBFD5ECC18272` (`projet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `historique`
--

INSERT INTO `historique` (`id`, `contact_id`, `entreprise_id`, `historique`, `title`, `created_at`, `projet_id`) VALUES
(1, NULL, NULL, 'azeeaz', 'aez', '2019-01-01 00:00:00', 3),
(2, NULL, NULL, 'Bleu nuit', 'Bleu', '2024-08-08 15:51:00', 3),
(4, NULL, NULL, 'Aucune histoire', 'Larra 123', '2024-08-08 16:19:00', 4);

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `identification`
--

INSERT INTO `identification` (`id`, `identification`) VALUES
(1, 'Foncier'),
(2, 'Immeuble'),
(3, 'Foncier + Immeuble'),
(4, 'Infrastructure'),
(5, 'Autre');

-- --------------------------------------------------------

--
-- 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,
  `proprietaire` tinyint(1) DEFAULT NULL,
  `usufruitier` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_AF99E9FDE7A1254A` (`contact_id`),
  KEY `IDX_AF99E9FD8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_33D1D9DD8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 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,
  `implantation_limite` tinyint(1) DEFAULT NULL,
  `implantation_retrait` tinyint(1) DEFAULT NULL,
  `recul` decimal(10,0) DEFAULT NULL,
  `exeption` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7D2373268A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 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,
  `non_reg` tinyint(1) DEFAULT NULL,
  `reglemente` tinyint(1) DEFAULT NULL,
  `precisez` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_FE59F5D68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `cout` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `realisations` longtext CHARACTER SET utf8mb4 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 AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `intervenant`
--

INSERT INTO `intervenant` (`id`, `tache_id`, `statut_id`, `entreprise_id`, `contact_id`, `observation`, `cout`, `date`, `realisations`, `duree`, `payer`) VALUES
(1, 2, 1, NULL, 5, 'rien', 0.00, '2024-08-02 10:05:00', NULL, '00:05:00', 0);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `objet` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `headers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue_name` varchar(190) CHARACTER SET utf8mb4 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 `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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_245862D68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 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 CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `construction_plan_cadastrale` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2B0C386B8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `occupation_terrain`
--

INSERT INTO `occupation_terrain` (`id`, `terrain_id`, `terrain_bati`, `nombre_nature_const`, `construction_plan_cadastrale`) VALUES
(5, 6, 1, NULL, 0),
(6, 7, 1, NULL, 0);

-- --------------------------------------------------------

--
-- 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,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2D0A4F228A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 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 AUTO_INCREMENT=6 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_95E194288A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_C9E547708A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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 AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `plan_bornage_joint`
--

INSERT INTO `plan_bornage_joint` (`id`, `terrain_id`, `statut`) VALUES
(1, 6, 1),
(2, 6, 1),
(3, 6, 1),
(4, 6, 1);

-- --------------------------------------------------------

--
-- 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,
  `statut` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_25765AF68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `plan_cadastre`
--

INSERT INTO `plan_cadastre` (`id`, `statut`, `terrain_id`) VALUES
(5, 1, 6);

-- --------------------------------------------------------

--
-- 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 AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `priorite`
--

INSERT INTO `priorite` (`id`, `name`) VALUES
(1, 'Faible'),
(2, 'Moyen'),
(3, 'Elevée'),
(4, 'Très élevée');

-- --------------------------------------------------------

--
-- Structure de la table `probleme`
--

DROP TABLE IF EXISTS `probleme`;
CREATE TABLE IF NOT EXISTS `probleme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `projet_id` int DEFAULT NULL,
  `class_probleme_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7AB2D714F6203804` (`statut_id`),
  KEY `IDX_7AB2D714C18272` (`projet_id`),
  KEY `IDX_7AB2D714AE1680A8` (`class_probleme_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `probleme`
--

INSERT INTO `probleme` (`id`, `statut_id`, `projet_id`, `class_probleme_id`) VALUES
(10, 1, 4, 1),
(12, 1, 3, 4),
(13, 1, 3, 2),
(18, 1, 5, 1),
(19, 2, 5, 3);

-- --------------------------------------------------------

--
-- Structure de la table `probleme_class`
--

DROP TABLE IF EXISTS `probleme_class`;
CREATE TABLE IF NOT EXISTS `probleme_class` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `probleme_class`
--

INSERT INTO `probleme_class` (`id`, `name`) VALUES
(1, 'Titre de propriété'),
(2, 'Indivision'),
(3, 'autre'),
(4, 'accès'),
(5, 'Limite'),
(6, 'Assiette'),
(7, 'Bornage'),
(8, 'Servitude de passage'),
(9, 'Servitude réseaux'),
(10, 'Négociation'),
(11, 'Offre');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `poste` varchar(500) CHARACTER SET utf8mb4 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,
  `name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `priorite_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_50159CA9C54C8C93` (`type_id`),
  KEY `IDX_50159CA953B4F1DE` (`priorite_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `projet`
--

INSERT INTO `projet` (`id`, `name`, `type_id`, `priorite_id`) VALUES
(3, 'mondonville 12', 2, NULL),
(4, 'larra - 1', 1, NULL),
(5, 'paris 75', 1, NULL);

-- --------------------------------------------------------

--
-- Structure de la table `projet_contact`
--

DROP TABLE IF EXISTS `projet_contact`;
CREATE TABLE IF NOT EXISTS `projet_contact` (
  `projet_id` int NOT NULL,
  `contact_id` int NOT NULL,
  PRIMARY KEY (`projet_id`,`contact_id`),
  KEY `IDX_CE48BB49C18272` (`projet_id`),
  KEY `IDX_CE48BB49E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `projet_contact`
--

INSERT INTO `projet_contact` (`projet_id`, `contact_id`) VALUES
(3, 2),
(3, 4),
(3, 5),
(5, 2),
(5, 4);

-- --------------------------------------------------------

--
-- Structure de la table `projet_terrain`
--

DROP TABLE IF EXISTS `projet_terrain`;
CREATE TABLE IF NOT EXISTS `projet_terrain` (
  `projet_id` int NOT NULL,
  `terrain_id` int NOT NULL,
  PRIMARY KEY (`projet_id`,`terrain_id`),
  KEY `IDX_4A5C0EC0C18272` (`projet_id`),
  KEY `IDX_4A5C0EC08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `projet_terrain`
--

INSERT INTO `projet_terrain` (`projet_id`, `terrain_id`) VALUES
(3, 6),
(3, 8),
(4, 6),
(4, 7);

-- --------------------------------------------------------

--
-- 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,
  `distance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6CFC4E4B8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 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,
  `distance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DA1406FE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 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,
  `distance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DDC29B468A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 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,
  `distance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8240717F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `raccordement_tel`
--

INSERT INTO `raccordement_tel` (`id`, `statut`) VALUES
(1, 'Oui'),
(2, 'Non'),
(3, 'Ne sais pas');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `section` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `numero` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_426BDFA18A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `reference_cadastrale`
--

INSERT INTO `reference_cadastrale` (`id`, `terrain_id`, `prefixe`, `section`, `numero`) VALUES
(4, 6, NULL, 'az', 32);

-- --------------------------------------------------------

--
-- 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,
  `oui` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_AADF24BE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `reglement_zone_joint`
--

INSERT INTO `reglement_zone_joint` (`id`, `oui`, `terrain_id`) VALUES
(2, 1, 6);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_E0CB4E98A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `relief_terrain`
--

INSERT INTO `relief_terrain` (`id`, `terrain_id`, `terrain_en_pente`, `pente_reguliere`, `plateau`, `talus`, `observation`) VALUES
(9, 6, 1, 0, 0, 0, NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `rendez_vous_hypotheque`
--

INSERT INTO `rendez_vous_hypotheque` (`id`, `terrain_id`, `oui`, `motif`, `non`) VALUES
(1, 6, 0, 'Aucun motif', 1),
(3, 7, 1, NULL, 0);

-- --------------------------------------------------------

--
-- 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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `rendez_vous_serv_urb`
--

INSERT INTO `rendez_vous_serv_urb` (`id`, `terrain_id`, `oui`, `motif`) VALUES
(1, 6, 1, 'aucu'),
(3, 7, 0, NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_ADCF20198A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` date DEFAULT NULL,
  `content` varchar(255) CHARACTER SET utf8mb4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B3E089AB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_FCF4F0998A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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,
  `oui` tinyint(1) DEFAULT NULL,
  `oui_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7CA4E4A08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_56AA69FC8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `servitude_publique`
--

INSERT INTO `servitude_publique` (`id`, `terrain_id`, `alignement`, `servitude_eau_gaz`, `servitude_degagement`, `servitude_monument_historique`, `servitude_marche_pied`, `autre`) VALUES
(3, 6, 1, 0, 0, 0, 0, NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `emplacement_reserve` tinyint(1) DEFAULT NULL,
  `emplacement_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_4C9264568A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_EE352B6D8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_adresse`
--

INSERT INTO `statut_adresse` (`id`, `statut`) VALUES
(1, 'Bureau'),
(2, 'Domicile'),
(3, 'Autre');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_communication`
--

INSERT INTO `statut_communication` (`id`, `statut`) VALUES
(1, 'Téléphone'),
(2, 'Mail'),
(3, 'Courrier');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_contact`
--

INSERT INTO `statut_contact` (`id`, `statut`) VALUES
(9, 'Mandant'),
(10, 'Intervenant'),
(11, 'Prescripteur'),
(12, 'Contact'),
(13, 'Prospect'),
(14, 'Usufruitier'),
(15, 'Proprietaire'),
(16, '...');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_deplacement`
--

INSERT INTO `statut_deplacement` (`id`, `statut`) VALUES
(1, 'Voiture perso'),
(2, 'Taxi'),
(3, 'Train'),
(4, 'Tram'),
(5, 'Métro'),
(6, 'Avion');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_etat_des_lieux`
--

INSERT INTO `statut_etat_des_lieux` (`id`, `statut`) VALUES
(1, 'Borne'),
(2, 'Electricité'),
(3, 'Eau potable'),
(4, 'Servitudes de passage'),
(5, 'Servitudes de reseaux'),
(6, 'Nuissances sonores'),
(7, 'Nuissances olfactives'),
(8, 'Clôtures'),
(9, 'composition et état des bâtiments'),
(10, 'composition et état des bâtiments'),
(11, 'accès et praticabilité'),
(12, 'Inondations'),
(13, 'problèmes de voisinage'),
(14, 'couloir aérien'),
(15, 'emplacement réservé'),
(16, 'projet à proximité'),
(17, 'risque incendie'),
(18, 'abf'),
(19, 'diagnostic archéologique'),
(20, 'contact des voisins'),
(21, 'contacts adm'),
(22, 'stationnement et parking nb'),
(23, 'Histoire du secteur et du site'),
(24, 'indices de valorisation du site'),
(25, 'autres');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_intervenant`
--

INSERT INTO `statut_intervenant` (`id`, `statut`) VALUES
(1, 'Client'),
(2, 'Mandant'),
(3, 'Intervenant'),
(4, 'Prescripteur'),
(5, 'Contact'),
(6, 'Prospect'),
(7, 'Autre');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_mail`
--

INSERT INTO `statut_mail` (`id`, `statut`) VALUES
(1, 'Personnel'),
(2, 'Personnel'),
(3, 'Autre');

-- --------------------------------------------------------

--
-- Structure de la table `statut_probleme`
--

DROP TABLE IF EXISTS `statut_probleme`;
CREATE TABLE IF NOT EXISTS `statut_probleme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_probleme`
--

INSERT INTO `statut_probleme` (`id`, `statut`) VALUES
(1, 'Juridique'),
(2, 'Technique'),
(3, 'Commercial');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_tache`
--

INSERT INTO `statut_tache` (`id`, `name`) VALUES
(1, 'A faire'),
(2, 'En cours'),
(3, 'ok');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_telephone`
--

INSERT INTO `statut_telephone` (`id`, `statut`) VALUES
(1, 'Bureau'),
(2, 'Domicile'),
(3, 'Portable');

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_390D383F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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,
  `probleme_id` int NOT NULL,
  `statut_id` int NOT NULL,
  `owner_id` int DEFAULT NULL,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_9387207596784F9E` (`probleme_id`),
  KEY `IDX_93872075F6203804` (`statut_id`),
  KEY `IDX_938720757E3C61F9` (`owner_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `tache`
--

INSERT INTO `tache` (`id`, `probleme_id`, `statut_id`, `owner_id`, `description`, `date`) VALUES
(2, 12, 1, NULL, 'Aller à la plage', '2024-08-01 17:35:00'),
(5, 10, 1, NULL, 'Aller chez le notaire', '2024-08-01 17:57:00'),
(6, 18, 2, NULL, 'Aller chez le notaire', '2024-08-01 17:58:00'),
(7, 13, 1, NULL, 'Aller faire des courses', '2024-08-02 11:52:00'),
(8, 19, 1, NULL, 'Aller faire les courses', '2024-08-02 14:07:00');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `observation` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_450FF010F6203804` (`statut_id`),
  KEY `IDX_450FF010A4AEAFEA` (`entreprise_id`),
  KEY `IDX_450FF010E7A1254A` (`contact_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `telephone`
--

INSERT INTO `telephone` (`id`, `statut_id`, `entreprise_id`, `contact_id`, `number`, `observation`) VALUES
(1, 3, NULL, 5, '07 89 54 86 28', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `terrain`
--

DROP TABLE IF EXISTS `terrain`;
CREATE TABLE IF NOT EXISTS `terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `commune` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code_postal` int DEFAULT NULL,
  `adress` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `remarque` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `terrain`
--

INSERT INTO `terrain` (`id`, `commune`, `code_postal`, `adress`, `name`, `remarque`) VALUES
(6, 'Marseille', 13000, 'bat 1 , étage 2, n°4,1 rue des fleurs', 'Marseille 123', NULL),
(7, 'Larra', 31330, '11 place des coquelicots', 'Larra1', NULL),
(8, 'Toulouse', 31000, '1 rue des fleurs', 'Bulle', NULL);

-- --------------------------------------------------------

--
-- 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,
  `oui` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `remarque` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_4DC07FCB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `terrain_reg_const`
--

INSERT INTO `terrain_reg_const` (`id`, `oui`, `terrain_id`, `remarque`) VALUES
(2, 1, 6, 'Hello');

-- --------------------------------------------------------

--
-- 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 AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `terrain_viabilise`
--

INSERT INTO `terrain_viabilise` (`id`, `terrain_id`, `oui`, `ne_sait_pas`) VALUES
(7, 6, 1, 0);

-- --------------------------------------------------------

--
-- 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,
  `metre` decimal(10,2) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  `sol_humide` tinyint(1) DEFAULT NULL,
  `difference_vegetation` tinyint(1) DEFAULT NULL,
  `puit` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_20C920A38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type`
--

INSERT INTO `type` (`id`, `name`) VALUES
(1, 'oui'),
(2, 'non'),
(3, 'Ne sais pas');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_doc_urbanisme`
--

INSERT INTO `type_doc_urbanisme` (`id`, `statut`) VALUES
(1, 'Plan d\'Occupation des sols (POS)'),
(2, 'Plan Local d\'ubanisme (PLU)'),
(3, 'Plan Local d\'ubanisme Intercommunal (PLUI)'),
(4, 'Carte Communale'),
(5, 'Reglement National d\'Urbanisme (RNU)');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_projet`
--

INSERT INTO `type_projet` (`id`, `type`) VALUES
(1, 'Foncier Seul'),
(2, 'Immeuble Seul'),
(3, 'Foncier + Immeuble'),
(4, 'Foncier Seul'),
(5, 'Immeuble Seul'),
(6, 'Foncier + Immeuble');

-- --------------------------------------------------------

--
-- 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,
  `prop_unique` tinyint(1) DEFAULT NULL,
  `indivision_copropriete` tinyint(1) DEFAULT NULL,
  `societe` tinyint(1) DEFAULT NULL,
  `personne_publique` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_EEA023D38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_proprietaire`
--

INSERT INTO `type_proprietaire` (`id`, `prop_unique`, `indivision_copropriete`, `societe`, `personne_publique`, `terrain_id`) VALUES
(5, 1, 0, 0, 0, 6);

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_voie_acces`
--

INSERT INTO `type_voie_acces` (`id`, `name`) VALUES
(1, 'Route Nationale'),
(2, 'Route Départementale'),
(3, 'Voie Communale'),
(4, 'Voie Privée'),
(5, 'Chemin rural'),
(6, 'Servitude de passage');

-- --------------------------------------------------------

--
-- 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `roles` json NOT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reset_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_8D93D649E7927C74` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `user`
--

INSERT INTO `user` (`id`, `email`, `roles`, `password`, `nom`, `prenom`, `reset_token`) VALUES
(1, 'tom@tom.fr', '[\"ROLE_USER\"]', '$2y$13$rFXpDaf6Ke/jvJ9dgReEjugh1CFArVjRSe/VnWI2Dzs/nKz1U9LFW', 'Tom', 'Tom', NULL);

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 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 AUTO_INCREMENT=4 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 AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_76DA94B68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 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 AUTO_INCREMENT=4 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 AUTO_INCREMENT=3 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_2929C3F08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `zone_occup_cond_part`
--

INSERT INTO `zone_occup_cond_part` (`id`, `terrain_id`, `content`) VALUES
(1, NULL, 'yop yop');

-- --------------------------------------------------------

--
-- 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_520ED56D8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_F79FCB298A2D8B41` (`terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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_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 `devis_deplacement`
--
ALTER TABLE `devis_deplacement`
  ADD CONSTRAINT `FK_BCF731C341DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_hebergement`
--
ALTER TABLE `devis_hebergement`
  ADD CONSTRAINT `FK_E633169D41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_prestation`
--
ALTER TABLE `devis_prestation`
  ADD CONSTRAINT `FK_E169C44541DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_restauration`
--
ALTER TABLE `devis_restauration`
  ADD CONSTRAINT `FK_FE224FAC41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_reunion`
--
ALTER TABLE `devis_reunion`
  ADD CONSTRAINT `FK_C9EE3FDE41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `document`
--
ALTER TABLE `document`
  ADD CONSTRAINT `FK_D8698A76D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`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 `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 `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 `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 `probleme`
--
ALTER TABLE `probleme`
  ADD CONSTRAINT `FK_7AB2D714AE1680A8` FOREIGN KEY (`class_probleme_id`) REFERENCES `probleme_class` (`id`),
  ADD CONSTRAINT `FK_7AB2D714C18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`),
  ADD CONSTRAINT `FK_7AB2D714F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_probleme` (`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_50159CA9C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_projet` (`id`);

--
-- Contraintes pour la table `projet_contact`
--
ALTER TABLE `projet_contact`
  ADD CONSTRAINT `FK_CE48BB49C18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_CE48BB49E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `projet_terrain`
--
ALTER TABLE `projet_terrain`
  ADD CONSTRAINT `FK_4A5C0EC08A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_4A5C0EC0C18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`) ON DELETE CASCADE;

--
-- 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_9387207596784F9E` FOREIGN KEY (`probleme_id`) REFERENCES `probleme` (`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_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 */;
