-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: gallery domain의 flyway ddl을 작성한다
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
create table if not exists gallery( | ||
id bigint not null, | ||
created_at TIMESTAMP(6) not null, | ||
updated_at TIMESTAMP(6) not null, | ||
feedback_reply varchar(255), | ||
feedback_count integer not null, | ||
survey_id bigint not null unique, | ||
save_count integer not null, | ||
user_id bigint not null unique, | ||
user_name varchar(255) not null, | ||
user_nickname varchar(255) not null, | ||
user_image_url varchar(255), | ||
version bigint, | ||
primary key (id) | ||
); | ||
|
||
create index gallery_idx_user_id on gallery(user_id); | ||
|
||
create table gallery_survey_tendency( | ||
id bigint not null, | ||
tendency_name varchar(255), | ||
tendency_count integer | ||
); | ||
|
||
alter table gallery_survey_tendency | ||
add constraint gallery_fk_gallery_survey_tendency | ||
foreign key (id) references gallery(id); | ||
|