From 5cf8240fa886fc37db0066d7fd588bc5f98dd1df Mon Sep 17 00:00:00 2001 From: devxb Date: Tue, 20 Feb 2024 00:22:33 +0900 Subject: [PATCH] =?UTF-8?q?build:=20gallery=20domain=EC=9D=98=20flyway=20d?= =?UTF-8?q?dl=EC=9D=84=20=EC=9E=91=EC=84=B1=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V7__gallery.sql | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 api/src/main/resources/db/migration/V7__gallery.sql diff --git a/api/src/main/resources/db/migration/V7__gallery.sql b/api/src/main/resources/db/migration/V7__gallery.sql new file mode 100644 index 00000000..2bdfff29 --- /dev/null +++ b/api/src/main/resources/db/migration/V7__gallery.sql @@ -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); +