-
Notifications
You must be signed in to change notification settings - Fork 1
/
printers.sql
64 lines (53 loc) · 1.71 KB
/
printers.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
--
-- Table structure for table `campuses`
--
CREATE TABLE `campuses` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`campus_name` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `error_log`
--
CREATE TABLE `error_log` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`host` varchar(255) COLLATE utf8_bin NOT NULL,
`message` varchar(32) COLLATE utf8_bin NOT NULL,
`timestamp` int(32) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `history`
--
CREATE TABLE `history` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`printer_id` int(255) NOT NULL,
`timestamp` int(255) NOT NULL,
`status` varchar(64) COLLATE utf8_bin NOT NULL,
`desc` varchar(255) COLLATE utf8_bin NOT NULL,
`tray_1` tinyint(255) NOT NULL,
`tray_2` tinyint(255) NOT NULL,
`tray_3` tinyint(255) NOT NULL,
`count` int(255) NOT NULL,
`toner` double(5,2) NOT NULL,
`kit_a` double(5,2) NOT NULL,
`kit_b` double(5,2) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `printers`
--
CREATE TABLE `printers` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_bin NOT NULL,
`mac` varchar(32) COLLATE utf8_bin NOT NULL,
`serial` varchar(255) COLLATE utf8_bin NOT NULL,
`model` varchar(255) COLLATE utf8_bin NOT NULL,
`campus_id` int(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;