Skip to content

Commit

Permalink
refactor(init.sql) : foreign key 부분 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Astin01 committed May 15, 2024
1 parent 6f34af3 commit 6bcf606
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/test/resources/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,18 @@ create table discussion
created_date varchar(255) not null,
title varchar(20) not null,
user_id bigint null,
primary key (id),
foreign key (user_id) references users (id)
primary key (id)
);

create table comment
(
id bigint generated by default as identity,
id Long generated by default as identity,
comment text,
created_date varchar(255) not null,
modified_date varchar(255) null,
discussion_id bigint null,
user_id bigint null,
primary key (id),
foreign key (user_id) references users (id),
foreign key (discussion_id) references discussion (id)
discussion_id Long null,
user_id Long null,
primary key (id)
);

create table suggestion
Expand All @@ -89,9 +86,7 @@ create table suggestion
title varchar(20) not null,
restaurant_id bigint null,
user_id bigint null,
primary key (id),
foreign key (restaurant_id) references restaurant (id),
foreign key (user_id) references users (id)
primary key (id)
);

create table role
Expand All @@ -107,7 +102,5 @@ create table user_role
created timestamp null,
role_id bigint null,
user_id bigint null,
primary key (user_role_id),
foreign key (user_id) references users (id),
foreign key (role_id) references role (id)
primary key (user_role_id)
);

0 comments on commit 6bcf606

Please sign in to comment.