forked from wean2016/springsecurity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spring_security.sql
52 lines (44 loc) · 1.39 KB
/
spring_security.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
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50617
Source Host : localhost:3306
Source Database : spring_security
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2017-10-05 13:17:04
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`role_id` int(2) NOT NULL,
`role_name` varchar(255) NOT NULL,
`auth` varchar(255) NOT NULL,
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES ('1', 'ROLE_USER', 'user');
INSERT INTO `role` VALUES ('2', 'ROLE_ADMIN', 'user,admin');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`role_id` int(2) NOT NULL,
`last_password_change` bigint(13) NOT NULL,
`enable` tinyint(1) NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('admin', '123456', '2', '0', '1');
INSERT INTO `user` VALUES ('guest', '123456', '1', '0', '1');