Skip to content

Commit

Permalink
Merge pull request zhangkaitao#3 from orangeyts/master
Browse files Browse the repository at this point in the history
初始化shiro.sql数据
  • Loading branch information
zhangkaitao committed Apr 12, 2014
2 parents c3dc18a + e0e4ae8 commit 6eea016
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions shiro-example-chapter2/src/sql/shiro.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
drop table if exists users;
drop table if exists user_roles;
drop table if exists roles_permissions;
drop database if exists shiro;
create database shiro;
use shiro;

create table users (
id bigint auto_increment,
Expand All @@ -25,4 +25,6 @@ create table roles_permissions(
permission varchar(100),
constraint pk_roles_permissions primary key(id)
) charset=utf8 ENGINE=InnoDB;
create unique index idx_roles_permissions on roles_permissions(role_name, permission);
create unique index idx_roles_permissions on roles_permissions(role_name, permission);

insert into users(username,password)values('zhang','123');

0 comments on commit 6eea016

Please sign in to comment.