avatar
Untitled

Guest 29 9th Oct, 2019

MARKUP 1.15 KB
                                           
                         # USERS
create table users (
    username varchar(50) not null primary key,
    password varchar(60) not null,
    enabled boolean not null
) engine = InnoDb;

# INSERT records into USERS table
INSERT INTO `users`(`username`, `password`, `enabled`) VALUES ('Arun', '$2a$10$LtnDdWr69IqOhFBJ/WSeW.crLgvuvfHlpnBsYtoIKXWIWdyYSExn6', 1);
INSERT INTO `users`(`username`, `password`, `enabled`) VALUES ('Jeremy', '$2a$10$ASSTQ.MacYyoYAfF4oz5CuE/lIZ79vilQPiwP7QDR0gEj7DLE8txK', 1);
INSERT INTO `users`(`username`, `password`, `enabled`) VALUES ('Jing', '$2a$10$ygW..BJgReZ4B5PJI13zOOUdhJpdIrLVUbiCsyinApyoCtBusdP.e', 1);

# AUTHORITIES
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;

# INSERT records into AUTHORITIES table
INSERT INTO authorities (username, authority) VALUES ('Arun', 'ROLE_ADMIN');
INSERT INTO authorities (username, authority) VALUES ('Jeremy', 'ROLE_USER');
INSERT INTO authorities (username, authority) VALUES ('Jing', 'ROLE_USER');
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes