155 lines
3.5 KiB
SQL
Executable File
155 lines
3.5 KiB
SQL
Executable File
-- phpMyAdmin SQL Dump
|
|
-- version 4.7.6
|
|
-- https://www.phpmyadmin.net/
|
|
--
|
|
-- Hôte : localhost
|
|
-- Généré le : sam. 22 déc. 2018 à 19:41
|
|
-- Version du serveur : 10.1.37-MariaDB-0+deb9u1
|
|
-- Version de PHP : 7.0.33-0+deb9u1
|
|
|
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
SET AUTOCOMMIT = 0;
|
|
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 : `TVJeanray`
|
|
--
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Structure de la table `communication`
|
|
--
|
|
|
|
CREATE TABLE `communication` (
|
|
`ID_Com` int(11) NOT NULL,
|
|
`Texte` varchar(200) DEFAULT NULL,
|
|
`Titre_Com` varchar(50) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Structure de la table `com_active`
|
|
--
|
|
|
|
CREATE TABLE `com_active` (
|
|
`ID_Com_Actif` int(11) NOT NULL,
|
|
`ID_Com` int(11) NOT NULL,
|
|
`ID_Zone` int(11) NOT NULL,
|
|
`Actif` tinyint(1) NOT NULL,
|
|
`Type` tinyint(4) NOT NULL DEFAULT '1',
|
|
`Date_debut` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`Date_fin` date NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Structure de la table `user`
|
|
--
|
|
|
|
CREATE TABLE `user` (
|
|
`id` int(11) NOT NULL,
|
|
`name` varchar(255) NOT NULL,
|
|
`pw` varchar(255) NOT NULL,
|
|
`actif` tinyint(1) NOT NULL DEFAULT '0'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Structure de la table `zone`
|
|
--
|
|
|
|
CREATE TABLE `zone` (
|
|
`ID_Zone` int(11) NOT NULL,
|
|
`Active` tinyint(1) NOT NULL,
|
|
`Nom` varchar(200) NOT NULL,
|
|
`Nord` double NOT NULL,
|
|
`Sud` double NOT NULL,
|
|
`Ouest` double NOT NULL,
|
|
`Est` double NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Index pour les tables déchargées
|
|
--
|
|
|
|
--
|
|
-- Index pour la table `communication`
|
|
--
|
|
ALTER TABLE `communication`
|
|
ADD PRIMARY KEY (`ID_Com`);
|
|
|
|
--
|
|
-- Index pour la table `com_active`
|
|
--
|
|
ALTER TABLE `com_active`
|
|
ADD PRIMARY KEY (`ID_Com_Actif`),
|
|
ADD KEY `ID_Zone` (`ID_Zone`),
|
|
ADD KEY `ID_Com` (`ID_Com`);
|
|
|
|
--
|
|
-- Index pour la table `user`
|
|
--
|
|
ALTER TABLE `user`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Index pour la table `zone`
|
|
--
|
|
ALTER TABLE `zone`
|
|
ADD PRIMARY KEY (`ID_Zone`);
|
|
|
|
--
|
|
-- AUTO_INCREMENT pour les tables déchargées
|
|
--
|
|
|
|
--
|
|
-- AUTO_INCREMENT pour la table `communication`
|
|
--
|
|
ALTER TABLE `communication`
|
|
MODIFY `ID_Com` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
|
|
|
--
|
|
-- AUTO_INCREMENT pour la table `com_active`
|
|
--
|
|
ALTER TABLE `com_active`
|
|
MODIFY `ID_Com_Actif` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
|
|
|
|
--
|
|
-- AUTO_INCREMENT pour la table `user`
|
|
--
|
|
ALTER TABLE `user`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
|
|
|
--
|
|
-- AUTO_INCREMENT pour la table `zone`
|
|
--
|
|
ALTER TABLE `zone`
|
|
MODIFY `ID_Zone` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
|
|
|
|
--
|
|
-- Contraintes pour les tables déchargées
|
|
--
|
|
|
|
--
|
|
-- Contraintes pour la table `com_active`
|
|
--
|
|
ALTER TABLE `com_active`
|
|
ADD CONSTRAINT `fk_com` FOREIGN KEY (`ID_Com`) REFERENCES `communication` (`ID_Com`),
|
|
ADD CONSTRAINT `fk_zone` FOREIGN KEY (`ID_Zone`) REFERENCES `zone` (`ID_Zone`);
|
|
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 */;
|