· 9 years ago · Dec 14, 2016, 07:49 PM
1-- phpMyAdmin SQL Dump
2-- version 4.6.5.2
3-- https://www.phpmyadmin.net/
4--
5-- Host: localhost
6-- Generation Time: Dec 14, 2016 at 08:28 PM
7-- Server version: 5.5.53-0+deb8u1
8-- PHP Version: 5.6.27-0+deb8u1
9
10SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11SET time_zone = "+00:00";
12
13
14/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17/*!40101 SET NAMES utf8mb4 */;
18
19--
20-- Database: `datalogger`
21--
22
23-- --------------------------------------------------------
24
25--
26-- Table structure for table `datalogger`
27--
28
29CREATE TABLE IF NOT EXISTS `datalogger` (
30 `date_time` datetime DEFAULT NULL,
31 `sensor` varchar(32) DEFAULT NULL,
32 `temperature` float UNSIGNED DEFAULT NULL,
33 `humidity` float UNSIGNED DEFAULT NULL,
34 `pwm` int(11) UNSIGNED DEFAULT NULL
35) ENGINE=InnoDB DEFAULT CHARSET=latin1;
36
37--
38-- Dumping data for table `datalogger`
39--
40
41INSERT INTO `datalogger` (`date_time`, `sensor`, `temperature`, `humidity`, `pwm`) VALUES
42('2016-12-13 19:35:07', '7', 24.7, 32.8, 0),
43('2016-12-13 19:36:07', '7', 24.8, 34.3, 0),
44('2016-12-13 19:37:07', '7', 23.6, 34.5, 0),
45('2016-12-13 19:38:04', '7', 24.1, 34.9, 0),
46('2016-12-13 19:40:07', '7', 23.3, 34.6, 0),
47('2016-12-13 19:41:04', '7', 23, 34.4, 0),
48('2016-12-13 19:42:05', '7', 23, 34.7, 0),
49('2016-12-13 19:44:04', '7', 23, 35.2, 0),
50('2016-12-13 19:45:04', '7', 22.7, 35.2, 0),
51('2016-12-13 19:46:05', '7', 22.5, 35.5, 0),
52('2016-12-13 19:47:05', '7', 22.5, 35.6, 0),
53('2016-12-13 19:48:04', '7', 22.5, 35.8, 0),
54('2016-12-13 19:49:04', '7', 22.6, 35.8, 0),
55('2016-12-13 19:50:05', '7', 22.7, 36.1, 0),
56('2016-12-13 19:51:04', '7', 21.9, 35.8, 0),
57('2016-12-13 19:52:37', '7', 22.4, 36, 0),
58('2016-12-13 19:53:05', '7', 21.6, 35.4, 0),
59('2016-12-13 19:54:05', '7', 22.3, 36.2, 0),
60('2016-12-13 19:56:05', '7', 22.3, 36.1, 0),
61('2016-12-13 19:57:09', '7', 22.3, 36.3, 0),
62('2016-12-13 19:52:05', '7', 22, 35.9, 0),
63('2016-12-13 20:04:55', '7', 22.2, 35.8, 0),
64('2016-12-13 20:05:05', '7', 22.1, 35.8, 0),
65('2016-12-13 20:06:22', '7', 22.1, 35.8, 0),
66('2016-12-13 20:07:06', '7', 22.2, 35.9, 0),
67('2016-12-13 20:08:07', '7', 22.3, 35.4, 0),
68('2016-12-13 20:09:06', '7', 22.4, 35.3, 0),
69('2016-12-13 20:11:04', '7', 22.2, 35.2, 0),
70('2016-12-13 20:12:04', '7', 22, 35, 0),
71('2016-12-13 20:14:06', '7', 22.3, 35.3, 0),
72('2016-12-13 20:15:05', '7', 22.1, 35.2, 0),
73('2016-12-13 20:16:04', '7', 22.6, 35.8, 0),
74('2016-12-13 20:17:04', '7', 21.7, 34.9, 0),
75('2016-12-13 20:18:05', '7', 22.5, 35.3, 0),
76('2016-12-13 20:19:04', '7', 22.8, 35.2, 0),
77('2016-12-13 20:21:05', '7', 22.1, 34.7, 0),
78('2016-12-13 20:22:04', '7', 22.4, 34.8, 0),
79('2016-12-13 20:23:04', '7', 22.4, 35.1, 0),
80('2016-12-13 20:24:04', '7', 22.1, 34.6, 0),
81('2016-12-13 20:25:04', '7', 23, 34.8, 0),
82('2016-12-13 20:26:05', '7', 22.2, 34.3, 0),
83('2016-12-13 20:27:04', '7', 22.4, 34.6, 0),
84('2016-12-13 20:28:04', '7', 22.5, 34.4, 0),
85('2016-12-13 20:29:04', '7', 22.3, 34.5, 0),
86('2016-12-13 20:30:04', '7', 22.4, 34.6, 0),
87('2016-12-13 20:31:04', '7', 22.3, 34.7, 0),
88('2016-12-13 20:32:05', '7', 22.2, 34.6, 0),
89('2016-12-13 20:33:05', '7', 22.3, 34.8, 0),
90('2016-12-13 20:34:04', '7', 22.4, 34.7, 0),
91('2016-12-13 20:36:04', '7', 22.5, 34.8, 0),
92('2016-12-14 20:03:08', '7', 19.8, 44.2, 0),
93('2016-12-14 20:04:04', '7', 20.2, 44.4, 0),
94('2016-12-14 20:05:03', '7', 20.2, 44.4, 0),
95('2016-12-14 20:07:08', '7', 20.2, 44.1, 0),
96('2016-12-14 20:08:08', '7', 20.3, 44.2, 0),
97('2016-12-14 20:11:33', '7', 20.1, 43.9, 0),
98('2016-12-14 20:12:08', '7', 20.1, 43.7, 0),
99('2016-12-14 20:13:08', '7', 20.3, 44, 0),
100('2016-12-14 20:13:44', '7', 20.5, 44.1, 0),
101('2016-12-14 20:14:08', '7', 20.1, 43.9, 0),
102('2016-12-14 20:15:08', '7', 20.1, 43.9, 0),
103('2016-12-14 20:16:04', '7', 20.1, 43.8, 0),
104('2016-12-14 20:17:03', '7', 20.3, 43.8, 0),
105('2016-12-14 20:18:08', '7', 20, 43.7, 0),
106('2016-12-14 20:19:08', '7', 19.7, 43.6, 0),
107('2016-12-14 20:21:08', '7', 19.7, 43.5, 0),
108('2016-12-14 20:23:08', '7', 20.1, 43.4, 0),
109('2016-12-14 20:25:08', '7', 20.5, 43.7, 0),
110('2016-12-14 20:27:08', '7', 20.5, 43.7, 0);
111
112-- --------------------------------------------------------
113
114--
115-- Table structure for table `history`
116--
117
118CREATE TABLE IF NOT EXISTS `history` (
119 `date_time` datetime DEFAULT NULL,
120 `sensor` varchar(32) DEFAULT NULL,
121 `temperature` float UNSIGNED DEFAULT NULL,
122 `humidity` float UNSIGNED DEFAULT NULL
123) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
124
125--
126-- Dumping data for table `history`
127--
128
129INSERT INTO `history` (`date_time`, `sensor`, `temperature`, `humidity`) VALUES
130('2015-01-25 16:00:00', '7', 26.47, 33.05),
131('2015-01-25 17:00:00', '7', 26.89, 34.7),
132('2015-01-25 18:00:00', '7', 24.9, 37.97),
133('2015-01-25 19:00:00', '7', 22.7, 43.72),
134('2015-01-25 20:00:00', '7', 21.25, 44.78),
135('2015-01-25 21:00:00', '7', 21.77, 43.64),
136('2015-01-25 22:00:00', '7', 21.78, 43.33),
137('2015-01-25 23:00:00', '7', 20.95, 43.75);
138
139-- --------------------------------------------------------
140
141--
142-- Table structure for table `reptile`
143--
144
145CREATE TABLE IF NOT EXISTS `reptile` (
146 `id` int(11) NOT NULL AUTO_INCREMENT,
147 `name` varchar(25) NOT NULL,
148 `sex` varchar(5) NOT NULL,
149 `age` varchar(5) NOT NULL,
150 `breed` varchar(5) NOT NULL,
151 `genetic` varchar(5) NOT NULL,
152 PRIMARY KEY (`id`)
153) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
154
155--
156-- Dumping data for table `reptile`
157--
158
159INSERT INTO `reptile` (`id`, `name`, `sex`, `age`, `breed`, `genetic`) VALUES
160(1, 'testReptile', '7', '10', '1', '1');
161
162-- --------------------------------------------------------
163
164--
165-- Table structure for table `temperatures`
166--
167
168CREATE TABLE IF NOT EXISTS `temperatures` (
169 `vivarium_id` int(3) NOT NULL AUTO_INCREMENT,
170 `temp_00_min` int(6) NOT NULL,
171 `temp_00_max` int(6) NOT NULL,
172 `temp_01_min` int(6) NOT NULL,
173 `temp_01_max` int(6) NOT NULL,
174 `temp_02_min` int(6) NOT NULL,
175 `temp_02_max` int(6) NOT NULL,
176 `temp_03_min` int(6) NOT NULL,
177 `temp_03_max` int(6) NOT NULL,
178 `temp_04_min` int(6) NOT NULL,
179 `temp_04_max` int(6) NOT NULL,
180 `temp_05_min` int(6) NOT NULL,
181 `temp_05_max` int(6) NOT NULL,
182 `temp_06_min` int(6) NOT NULL,
183 `temp_06_max` int(6) NOT NULL,
184 `temp_07_min` int(6) NOT NULL,
185 `temp_07_max` int(6) NOT NULL,
186 `temp_08_min` int(6) NOT NULL,
187 `temp_08_max` int(6) NOT NULL,
188 `temp_09_min` int(6) NOT NULL,
189 `temp_09_max` int(6) NOT NULL,
190 `temp_10_min` int(6) NOT NULL,
191 `temp_10_max` int(6) NOT NULL,
192 `temp_11_min` int(6) NOT NULL,
193 `temp_11_max` int(6) NOT NULL,
194 `temp_12_min` int(6) NOT NULL,
195 `temp_12_max` int(6) NOT NULL,
196 `temp_13_min` int(6) NOT NULL,
197 `temp_13_max` int(6) NOT NULL,
198 `temp_14_min` int(6) NOT NULL,
199 `temp_14_max` int(6) NOT NULL,
200 `temp_15_min` int(6) NOT NULL,
201 `temp_15_max` int(6) NOT NULL,
202 `temp_16_min` int(6) NOT NULL,
203 `temp_16_max` int(6) NOT NULL,
204 `temp_17_min` int(6) NOT NULL,
205 `temp_17_max` int(6) NOT NULL,
206 `temp_18_min` int(6) NOT NULL,
207 `temp_18_max` int(6) NOT NULL,
208 `temp_19_min` int(6) NOT NULL,
209 `temp_19_max` int(6) NOT NULL,
210 `temp_20_min` int(6) NOT NULL,
211 `temp_20_max` int(6) NOT NULL,
212 `temp_21_min` int(6) NOT NULL,
213 `temp_21_max` int(6) NOT NULL,
214 `temp_22_min` int(6) NOT NULL,
215 `temp_22_max` int(6) NOT NULL,
216 `temp_23_min` int(6) NOT NULL,
217 `temp_23_max` int(6) NOT NULL,
218 PRIMARY KEY (`vivarium_id`)
219) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
220
221--
222-- Dumping data for table `temperatures`
223--
224
225INSERT INTO `temperatures` (`vivarium_id`, `temp_00_min`, `temp_00_max`, `temp_01_min`, `temp_01_max`, `temp_02_min`, `temp_02_max`, `temp_03_min`, `temp_03_max`, `temp_04_min`, `temp_04_max`, `temp_05_min`, `temp_05_max`, `temp_06_min`, `temp_06_max`, `temp_07_min`, `temp_07_max`, `temp_08_min`, `temp_08_max`, `temp_09_min`, `temp_09_max`, `temp_10_min`, `temp_10_max`, `temp_11_min`, `temp_11_max`, `temp_12_min`, `temp_12_max`, `temp_13_min`, `temp_13_max`, `temp_14_min`, `temp_14_max`, `temp_15_min`, `temp_15_max`, `temp_16_min`, `temp_16_max`, `temp_17_min`, `temp_17_max`, `temp_18_min`, `temp_18_max`, `temp_19_min`, `temp_19_max`, `temp_20_min`, `temp_20_max`, `temp_21_min`, `temp_21_max`, `temp_22_min`, `temp_22_max`, `temp_23_min`, `temp_23_max`) VALUES
226(1, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40, 10, 40);
227
228-- --------------------------------------------------------
229
230--
231-- Table structure for table `user_jviv`
232--
233
234CREATE TABLE IF NOT EXISTS `user` (
235 `id_user` int(11) NOT NULL AUTO_INCREMENT,
236 `name` varchar(25) NOT NULL,
237 `username` varchar(25) NOT NULL,
238 `password` varchar(75) NOT NULL,
239 PRIMARY KEY (`id_user`)
240) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
241
242--
243-- Dumping data for table `user`
244--
245
246INSERT INTO `user` (`id_user`, `name`, `username`, `password`) VALUES
247(1, 'user', 'user', 'password');
248
249-- --------------------------------------------------------
250
251--
252-- Table structure for table `vivarium`
253--
254
255CREATE TABLE IF NOT EXISTS `vivarium` (
256 `id` int(11) NOT NULL AUTO_INCREMENT,
257 `name` varchar(25) NOT NULL,
258 `sensor_id` int(2) NOT NULL,
259 `heat_watt` int(3) NOT NULL,
260 `viv_width` int(3) NOT NULL,
261 `viv_height` int(3) NOT NULL,
262 `viv_depth` int(3) NOT NULL,
263 `reptile_id` int(2) NOT NULL,
264 `visible` int(1) UNSIGNED ZEROFILL NOT NULL,
265 `min_humid` int(10) UNSIGNED NOT NULL,
266 `max_humid` int(11) UNSIGNED DEFAULT NULL,
267 PRIMARY KEY (`id`)
268) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
269
270--
271-- Dumping data for table `vivarium`
272--
273
274INSERT INTO `vivarium` (`id`, `name`, `sensor_id`, `heat_watt`, `viv_width`, `viv_height`, `viv_depth`, `reptile_id`, `visible`, `min_humid`, `max_humid`) VALUES
275(1, 'test', 7, 10, 1, 1, 1, 1, 1, 30, 99);
276
277/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
278/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
279/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;