Created
September 17, 2013 20:01
-
-
Save ggdio/6599790 to your computer and use it in GitHub Desktop.
Spring Security DDL Commands for MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table users ( | |
username varchar(50) not null primary key, | |
password varchar(50) not null, | |
enabled boolean not null | |
) engine = InnoDb; | |
create table authorities ( | |
username varchar(50) not null, | |
authority varchar(50) not null, | |
foreign key (username) references users (username), | |
unique index authorities_idx_1 (username, authority) | |
) engine = InnoDb; | |
create table persistent_logins ( | |
username varchar(64) not null, | |
series varchar(64) primary key, | |
token varchar(64) not null, | |
last_used timestamp not null | |
) engine = InnoDb; | |
create table groups ( | |
id bigint unsigned not null auto_increment primary key, | |
group_name varchar(50) not null | |
) engine = InnoDb; | |
create table group_authorities ( | |
group_id bigint unsigned not null, | |
authority varchar(50) not null, | |
foreign key (group_id) references groups (id) | |
) engine = InnoDb; | |
create table group_members ( | |
id bigint unsigned not null auto_increment primary key, | |
username varchar(50) not null, | |
group_id bigint unsigned not null, | |
foreign key (group_id) references groups (id) | |
) engine = InnoDb; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment