-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
59 lines (48 loc) · 1.5 KB
/
database.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-- phpMyAdmin SQL Dump
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 utf8 */;
--
-- Database: `nest`
--
-- --------------------------------------------------------
--
-- Table structure for table `statistics`
--
CREATE TABLE IF NOT EXISTS `statistics` (
`id` int(10) NOT NULL,
`mode` varchar(10) NOT NULL,
`temperature` decimal(5,2) NOT NULL,
`humidity` int(10) NOT NULL,
`heat` int(10) DEFAULT NULL,
`alt_heat` int(10) DEFAULT NULL,
`auto_away` int(10) DEFAULT NULL,
`manual_away` int(10) DEFAULT NULL,
`leaf` int(10) DEFAULT NULL,
`time_to_target` int(10) NOT NULL,
`temperature_target` decimal(5,2) NOT NULL,
`mode_target` varchar(10) NOT NULL,
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `statistics`
--
ALTER TABLE `statistics`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `statistics`
--
ALTER TABLE `statistics`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
/*!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 */;