CREATE TABLE users(
username VARCHAR2(50) NOT NULL PRIMARY KEY,
password VARCHAR2(50) NOT NULL,
enabled CHAR(1) DEFAULT '1' );
CREATE TABLE authorities(
username VARCHAR2(50) NOT NULL,
authority VARCHAR2(50) NOT NULL,
CONSTRAINT fk_authorities_users FOREIGN KEY(username) REFERENCES users(username));
CREATE UNIQUE INDEX ix_auth_username on authorities (username, authority);
INSERT INTO users (username, password) VALUES ('user00', 'pw00');
INSERT INTO users (username, password) VALUES ('member00', 'pw00');
INSERT INTO users (username, password) VALUES ('admin00', 'pw00');
INSERT INTO authorities (username, authority) VALUES ('user00', 'ROLE_USER');
INSERT INTO authorities (username, authority) VALUES ('member00', 'ROLE_MANAGER');
INSERT INTO authorities (username, authority) VALUES ('admin00', 'ROLE_MANAGER');
INSERT INTO authorities (username, authority) VALUES ('admin00', 'ROLE_ADMIN');
COMMIT;
'Memo' 카테고리의 다른 글
QueryDSL로 생성한 Q도메인들을 찾지 못할 때 (0) | 2020.05.17 |
---|---|
@joincolumn cannot resolve column (0) | 2020.05.10 |
java import error (0) | 2020.02.19 |