Skip to content

Commit

Permalink
build: gallery domain의 flyway ddl을 작성한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Feb 19, 2024
1 parent 21f4771 commit 5cf8240
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions api/src/main/resources/db/migration/V7__gallery.sql
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);

0 comments on commit 5cf8240

Please sign in to comment.