-
Notifications
You must be signed in to change notification settings - Fork 3
/
mysql_schema.sql
54 lines (47 loc) · 1.62 KB
/
mysql_schema.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
CREATE TABLE `clock` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`employee_id` int(11) NOT NULL,
`in` int(11) NOT NULL,
`out` int(11) DEFAULT NULL,
`error` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `employees` (
`id` int(255) unsigned NOT NULL AUTO_INCREMENT,
`number` varchar(255) NOT NULL DEFAULT '',
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `number` (`number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `settings` (
`key` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- SQL CODE FOR AG_AUTH, BY ADAM GRIFFITHS
-- https://github.com/adamgriffiths/ag-auth
CREATE TABLE `ci_sessions` (
`session_id` varchar(40) NOT NULL DEFAULT '0',
`ip_address` varchar(16) NOT NULL DEFAULT '0',
`user_agent` varchar(255) NOT NULL,
`last_activity` int(10) unsigned NOT NULL DEFAULT '0',
`user_data` text NOT NULL,
PRIMARY KEY (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `groups` (
`id` int(11) NOT NULL,
`title` varchar(20) NOT NULL DEFAULT '',
`description` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`group_id` int(11) NOT NULL DEFAULT '100',
`token` varchar(255) NOT NULL,
`identifier` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;