Skip to content

Commit 6698d07

Browse files
authored
Merge pull request #53 from Invincible-Backend-Study/be/dev
chore: flyway 적용
2 parents 644e9e7 + f8394e4 commit 6698d07

File tree

5 files changed

+121
-2
lines changed

5 files changed

+121
-2
lines changed

backend/.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@ out/
3737
.vscode/
3838

3939

40-
/src/main/resources/**
40+
/src/main/resources/*.yml
41+
/src/main/resources/*.key
42+
/src/main/resources/*.pub
43+
/src/main/resources/*.properties
44+
/src/main/resources/*.st
45+

backend/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## 깃 컨벤션
2+
3+
- feat: 새로운 기능 추가
4+
- fix: 버그 수정
5+
- docs: 문서 수정
6+
- style: 코드 스타일 변경 (코드 포매팅, 세미콜론 누락 등)
7+
- design: 사용자 UI 디자인 변경 (CSS 등)
8+
- test: 테스트 코드, 리팩토링 (Test Code)
9+
- refactor: 리팩토링 (Production Code)
10+
- build: 빌드 파일 수정
11+
- ci: CI 설정 파일 수정
12+
- perf: 성능 개선
13+
- chore: 자잘한 수정이나 빌드 업데이트
14+
- rename: 파일 혹은 폴더명을 수정만 한 경우
15+
- remove: 파일을 삭제만 한 경우

backend/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ dependencies {
8585
// validation
8686
implementation 'org.springframework.boot:spring-boot-starter-validation'
8787

88+
// flyway
89+
implementation 'org.flywaydb:flyway-core'
90+
implementation 'org.flywaydb:flyway-mysql'
91+
8892
// mysql
8993
implementation platform("com.google.cloud:spring-cloud-gcp-dependencies:5.3.0")
9094
implementation "com.google.cloud:spring-cloud-gcp-starter-sql-mysql:5.3.0"

backend/secret

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
create table if not exists interview_items
2+
(
3+
remain_tail_question_count int not null,
4+
score int null,
5+
time_to_answer int null,
6+
created_at datetime(6) null,
7+
id bigint auto_increment
8+
primary key,
9+
interview_id bigint not null,
10+
member_id bigint not null,
11+
question_id bigint not null,
12+
updated_at datetime(6) null,
13+
content varchar(2000) null,
14+
feedback_content varchar(2000) null,
15+
question_content varchar(255) not null,
16+
tail_question varchar(255) null,
17+
answer_state enum ('COMPLETE', 'INIT', 'PASS') null
18+
);
19+
20+
create table if not exists interviews
21+
(
22+
interview_index int not null,
23+
size int not null,
24+
tail_question_depth int null,
25+
time_to_answer int null,
26+
time_to_think int null,
27+
created_at datetime(6) null,
28+
id bigint auto_increment
29+
primary key,
30+
member_id bigint not null,
31+
updated_at datetime(6) null,
32+
title varchar(255) not null,
33+
interview_state enum ('DONE', 'PROGRESS') null
34+
);
35+
36+
create table if not exists members
37+
(
38+
id bigint auto_increment
39+
primary key,
40+
avatar_url varchar(255) null,
41+
nickname varchar(255) not null,
42+
provider_id varchar(255) null
43+
);
44+
45+
create table if not exists question_sets
46+
(
47+
default_tail_question_depth int null,
48+
default_time_to_answer int null,
49+
default_time_to_think int null,
50+
admin_id bigint not null,
51+
created_at datetime(6) null,
52+
id bigint auto_increment
53+
primary key,
54+
updated_at datetime(6) null,
55+
description varchar(255) null,
56+
thumbnail_url varchar(255) null,
57+
title varchar(255) not null
58+
);
59+
60+
create table if not exists questions
61+
(
62+
sequence int not null,
63+
created_at datetime(6) null,
64+
id bigint auto_increment primary key,
65+
question_set_id bigint not null,
66+
updated_at datetime(6) null,
67+
content varchar(255) not null,
68+
reference_links varchar(255) null,
69+
constraint FKkpkuc627fwg4g9prwdfb0mj2l
70+
foreign key (question_set_id) references question_sets (id)
71+
);
72+
73+
create table if not exists refresh_tokens
74+
(
75+
id bigint not null
76+
primary key,
77+
token varchar(700) null
78+
);
79+
80+
create table if not exists tail_questions
81+
(
82+
score int null,
83+
time_to_answer int null,
84+
id bigint auto_increment
85+
primary key,
86+
interview_id bigint not null,
87+
interview_question_id bigint not null,
88+
member_id bigint not null,
89+
content varchar(2000) null,
90+
feedback_content varchar(2000) null,
91+
question varchar(255) not null,
92+
tail_question varchar(255) null,
93+
answer_state enum ('COMPLETE', 'INIT', 'PASS') null
94+
);
95+

0 commit comments

Comments
 (0)