Skip to content

Commit 8e80200

Browse files
committed
fix: renamed join table
1 parent 180c89c commit 8e80200

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/kotlin/osahner/domain/User.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class User(
4141

4242
@ManyToMany(fetch = FetchType.EAGER, cascade = [CascadeType.MERGE])
4343
@JoinTable(
44-
name = "user_role",
44+
name = "app_user_role",
4545
joinColumns = [JoinColumn(name = "user_id", referencedColumnName = "id")],
4646
inverseJoinColumns = [JoinColumn(name = "role_id", referencedColumnName = "id")]
4747
)

src/main/resources/data.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ VALUES (1, 'Admin', 'Admin', '$2a$10$5AWyzymSnNypg9BkMOyKE.zA05GtRKHCoWimh.q2w.K
1414
INSERT INTO app_user (id, first_name, last_name, password, username, isUsing2FA, secret)
1515
VALUES (2, 'John', 'Doe', '$2a$10$5AWyzymSnNypg9BkMOyKE.zA05GtRKHCoWimh.q2w.KAO5koBYPM6', 'john.doe', true, '5TPFV3VGX3EKYAET');
1616

17-
TRUNCATE TABLE user_role;
18-
INSERT INTO user_role(user_id, role_id)
17+
TRUNCATE TABLE app_user_role;
18+
INSERT INTO app_user_role(user_id, role_id)
1919
VALUES (1, 1);
20-
INSERT INTO user_role(user_id, role_id)
20+
INSERT INTO app_user_role(user_id, role_id)
2121
VALUES (1, 2);
22-
INSERT INTO user_role(user_id, role_id)
22+
INSERT INTO app_user_role(user_id, role_id)
2323
VALUES (2, 2);
2424

2525
TRUNCATE TABLE address;

0 commit comments

Comments
 (0)