-
Notifications
You must be signed in to change notification settings - Fork 6
/
export.sql
100 lines (81 loc) · 2.27 KB
/
export.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
--
-- Database: `velbus`
--
CREATE DATABASE IF NOT EXISTS `velbus` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `velbus`;
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`id` int(11) NOT NULL,
`date` datetime NOT NULL,
`raw` varchar(50) NOT NULL,
`address` varchar(2) NOT NULL,
`prio` varchar(8) NOT NULL,
`type` varchar(2) NOT NULL,
`rtr_size` varchar(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `modules`
--
CREATE TABLE `modules` (
`address` varchar(2) NOT NULL,
`name` varchar(16) NOT NULL,
`type` varchar(16) NOT NULL,
`status` varchar(16) NOT NULL,
`date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `modules_channel_info`
--
CREATE TABLE `modules_channel_info` (
`address` varchar(2) NOT NULL,
`channel` varchar(40) NOT NULL,
`data` varchar(40) NOT NULL,
`value` varchar(120) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `modules_info`
--
CREATE TABLE `modules_info` (
`address` varchar(2) NOT NULL,
`data` varchar(40) NOT NULL,
`value` varchar(120) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `modules`
--
ALTER TABLE `modules`
ADD PRIMARY KEY (`address`);
--
-- Indexes for table `modules_channel_info`
--
ALTER TABLE `modules_channel_info`
ADD UNIQUE KEY `address` (`address`,`channel`,`data`) USING BTREE;
--
-- Indexes for table `modules_info`
--
ALTER TABLE `modules_info`
ADD UNIQUE KEY `address` (`address`,`data`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;