forked from andrew867/timeclock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_tables.sql
150 lines (118 loc) · 3.77 KB
/
create_tables.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# if you would like to utilize a table prefix when creating these tables, be sure to reflect that in config.inc.php so the program
# will be aware of it. this option is $db_prefix. if you are unaware of what is meant by utilizing a 'table prefix', then please disregard.
#
# Table structure for table `audit`
#
CREATE TABLE audit (
modified_by_ip VARCHAR(39) NOT NULL DEFAULT '',
modified_by_user VARCHAR(50) NOT NULL DEFAULT '',
modified_when BIGINT(14) NOT NULL,
modified_from BIGINT(14) NOT NULL,
modified_to BIGINT(14) NOT NULL,
modified_why VARCHAR(250) NOT NULL DEFAULT '',
user_modified VARCHAR(50) NOT NULL DEFAULT '',
PRIMARY KEY (modified_when),
UNIQUE KEY modified_when (modified_when)
)
ENGINE =MyISAM;
# --------------------------------------------------------
#
# Table structure for table `dbversion`
#
CREATE TABLE dbversion (
dbversion DECIMAL(5, 1) NOT NULL DEFAULT '0.0',
PRIMARY KEY (dbversion)
)
ENGINE =MyISAM;
#
# Dumping data for table `dbversion`
#
INSERT INTO dbversion VALUES ('1.4');
# --------------------------------------------------------
#
# Table structure for table `employees`
#
CREATE TABLE employees (
empfullname VARCHAR(50) NOT NULL DEFAULT '',
tstamp BIGINT(14) DEFAULT NULL,
employee_passwd VARCHAR(25) NOT NULL DEFAULT '',
displayname VARCHAR(50) NOT NULL DEFAULT '',
email VARCHAR(75) NOT NULL DEFAULT '',
groups VARCHAR(50) NOT NULL DEFAULT '',
office VARCHAR(50) NOT NULL DEFAULT '',
admin TINYINT(1) NOT NULL DEFAULT '0',
reports TINYINT(1) NOT NULL DEFAULT '0',
time_admin TINYINT(1) NOT NULL DEFAULT '0',
disabled TINYINT(1) NOT NULL DEFAULT '0',
PRIMARY KEY (empfullname)
)
ENGINE =MyISAM;
#
# Dumping data for table `employees`
#
INSERT INTO employees VALUES ('admin', NULL, 'xy.RY2HT1QTc2', 'administrator', '', '', '', 1, 1, 1, '');
# --------------------------------------------------------
#
# Table structure for table `groups`
#
CREATE TABLE groups (
groupname VARCHAR(50) NOT NULL DEFAULT '',
groupid INT(10) NOT NULL AUTO_INCREMENT,
officeid INT(10) NOT NULL DEFAULT '0',
PRIMARY KEY (groupid)
)
ENGINE =MyISAM;
# --------------------------------------------------------
#
# Table structure for table `info`
#
CREATE TABLE info (
fullname VARCHAR(50) NOT NULL DEFAULT '',
`inout` VARCHAR(50) NOT NULL DEFAULT '',
timestamp BIGINT(14) DEFAULT NULL,
notes VARCHAR(250) DEFAULT NULL,
ipaddress VARCHAR(39) NOT NULL DEFAULT '',
KEY fullname (fullname)
)
ENGINE =MyISAM;
# --------------------------------------------------------
#
# Table structure for table `metars`
#
CREATE TABLE metars (
metar VARCHAR(255) NOT NULL DEFAULT '',
timestamp TIMESTAMP NOT NULL,
station VARCHAR(4) NOT NULL DEFAULT '',
PRIMARY KEY (station),
UNIQUE KEY station (station)
)
ENGINE =MyISAM;
# --------------------------------------------------------
#
# Table structure for table `offices`
#
CREATE TABLE offices (
officename VARCHAR(50) NOT NULL DEFAULT '',
officeid INT(10) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (officeid)
)
ENGINE =MyISAM;
# --------------------------------------------------------
#
# Table structure for table `punchlist`
#
CREATE TABLE punchlist (
punchitems VARCHAR(50) NOT NULL DEFAULT '',
color VARCHAR(7) NOT NULL DEFAULT '',
in_or_out TINYINT(1) DEFAULT NULL,
PRIMARY KEY (punchitems)
)
ENGINE =MyISAM;
#
# Dumping data for table `punchlist`
#
INSERT INTO punchlist VALUES ('in', '#009900', 1);
INSERT INTO punchlist VALUES ('out', '#FF0000', 0);
INSERT INTO punchlist VALUES ('break', '#FF9900', 0);
INSERT INTO punchlist VALUES ('lunch', '#0000FF', 0);
# --------------------------------------------------------