-- phpMyAdmin SQL Dump
-- version 4.6.0
-- http://www.phpmyadmin.net
--
-- Client :  localhost
-- Généré le :  Mar 13 Décembre 2016 à 11:35
-- Version du serveur :  10.1.18-MariaDB-1~jessie
-- Version de PHP :  7.0.12-1~dotdeb+8.1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 :  `domo`
--

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

--
-- Structure de la table `daily_temp`
--

CREATE TABLE `daily_temp` (
  `conditions` text NOT NULL,
  `date` varchar(10) NOT NULL,
  `h_temp` decimal(4,2) NOT NULL,
  `icon` text NOT NULL,
  `l_temp` decimal(4,2) NOT NULL,
  `ID` int(10) NOT NULL,
  `Date_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Structure de la table `data`
--

CREATE TABLE `data` (
  `heating` text NOT NULL,
  `target` varchar(6) NOT NULL,
  `current` varchar(6) NOT NULL,
  `humidity` tinyint(3) UNSIGNED NOT NULL,
  `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `json` varchar(1500) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Structure de la table `hourly_temp`
--

CREATE TABLE `hourly_temp` (
  `time` varchar(10) NOT NULL,
  `temp` decimal(4,2) NOT NULL,
  `humidity` decimal(2,0) NOT NULL,
  `ID` int(10) NOT NULL,
  `Date_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Structure de la table `outside`
--

CREATE TABLE `outside` (
  `conditions` text,
  `humidity` text,
  `current` varchar(6) DEFAULT '0',
  `wind` text,
  `sgmt` text,
  `weather` text,
  `sunrise` bigint(10) DEFAULT NULL,
  `sunset` bigint(10) DEFAULT NULL,
  `win_dir` text,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Structure de la table `sensor_cuve`
--

CREATE TABLE `sensor_cuve` (
  `id` int(11) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `value` varchar(6) NOT NULL,
  `local` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


--
-- Structure de la table `temper`
--

CREATE TABLE `temper` (
  `t_cuve` varchar(7) NOT NULL,
  `t_gara` varchar(7) NOT NULL,
  `local` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='récuperation des diffèrentes températures';

--
-- Index pour les tables exportées
--

--
-- Index pour la table `daily_temp`
--
ALTER TABLE `daily_temp`
  ADD PRIMARY KEY (`ID`);

--
-- Index pour la table `data`
--
ALTER TABLE `data`
  ADD PRIMARY KEY (`timestamp`);

--
-- Index pour la table `hourly_temp`
--
ALTER TABLE `hourly_temp`
  ADD PRIMARY KEY (`ID`);

--
-- Index pour la table `outside`
--
ALTER TABLE `outside`
  ADD PRIMARY KEY (`timestamp`);

--
-- Index pour la table `sensor_cuve`
--
ALTER TABLE `sensor_cuve`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `temper`
--
ALTER TABLE `temper`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT pour les tables exportées
--

--
-- AUTO_INCREMENT pour la table `daily_temp`
--
ALTER TABLE `daily_temp`
  MODIFY `ID` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=916;
--
-- AUTO_INCREMENT pour la table `hourly_temp`
--
ALTER TABLE `hourly_temp`
  MODIFY `ID` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8400;
--
-- AUTO_INCREMENT pour la table `sensor_cuve`
--
ALTER TABLE `sensor_cuve`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1355;
--
-- AUTO_INCREMENT pour la table `temper`
--
ALTER TABLE `temper`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=985;
/*!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 */;
