Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/resources/db/migration/V2__create_user_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE user (
id int PRIMARY KEY AUTO_INCREMENT NOT NULL,
username varchar(100) NOT NULL,
password varchar(100) NOT NULL,
role_id int NOT NULL,
CONSTRAINT FK_UserRole FOREIGN KEY (id)
REFERENCES role(id)
);
11 changes: 11 additions & 0 deletions src/main/resources/db/migration/V3__add_role_and_user_data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
insert into role (title)
values ('admin');

insert into role (title)
values ('employee');

insert into user(username, password, role_id)
values ('jemima','1234567',1);

insert into user(username, password, role_id)
values ('bobby','abcdefg',2);