-
Notifications
You must be signed in to change notification settings - Fork 18
/
database_schema.v1.3.sql
executable file
·68 lines (53 loc) · 1.81 KB
/
database_schema.v1.3.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
-- codeigniter-user Auth Library database schema.
--
-- Author: Waldir Bertazzi Junior
-- Version: 1.3
-- --------------------------------------------------------
--
-- Table structure for table `permissions`
--
CREATE TABLE IF NOT EXISTS `permissions` (
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
`name` varchar(12) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `permissions`
--
INSERT INTO `permissions` (`id`, `name`, `description`) VALUES
(1, 'admin', 'System administrators.');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL,
`email` varchar(30) DEFAULT NULL,
`login` varchar(18) NOT NULL,
`password` varchar(60) NOT NULL,
`last_login` date DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `login`, `password`, `last_login`, `active`) VALUES
(1, 'Administrator', 'admin@localhost', 'admin', '$2a$12$SR04o2/JNV5ZoVGZNgPiiezqM2f5D0eVDXsSDoWcfQqg/mST6O6Ye', '2014-02-07', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users_permissions`
--
CREATE TABLE IF NOT EXISTS `users_permissions` (
`user_id` mediumint(8) NOT NULL,
`permission_id` mediumint(8) NOT NULL,
KEY `user_id` (`user_id`),
KEY `permission_id` (`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users_permissions`
--
INSERT INTO `users_permissions` (`user_id`, `permission_id`) VALUES (1, 1);