-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/feat: flyway V5 DML이 적용되지 않는 문제 해결 + 테스트 컨테이너 적용 #729
Merged
+158
−207
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8c438e1
test: 테스트 컨테이너 적용
hyeon0208 c57e32d
style: 컨벤션 적용
hyeon0208 06fe165
chore: gradle compose 플러그인 적용
hyeon0208 c3a9fc3
chore: local용 db 연결 설정
hyeon0208 338dad1
test: ddl-auto 설정 변경
hyeon0208 0679e5e
test: 데이터 클리너 로직 수정
hyeon0208 14dfea0
chore: fly 스키마 파일 변경
hyeon0208 f89c094
refactor: 테스트컨테이너 타임존 설정 추가
hyeon0208 6131e97
chore: git action runner 타임존 출력
hyeon0208 7270bd8
chore: git action runner 타임존 한국으로 설정
hyeon0208 54f53db
chore: 테스트 컨테이너 타임존 한국으로 설정
hyeon0208 b871c2d
chore: 애플리케이션 DB 컨테이너 TZ 한국으로 설정
hyeon0208 671b5f0
chore: DB 컨테이너 스크립트로 초기화되도록 수정
hyeon0208 7081022
chore: DB 컨테이너 실행 커맨드 수정
hyeon0208 2b445eb
chore: dev, prod ci jops 타임존 설정
hyeon0208 06c488f
chore: 프로필 별 flyway 설정 적용
hyeon0208 ad794e6
chore: 의존성 컨벤션 적용
hyeon0208 16acd52
test: h2를 사용한 테스트로 롤백
hyeon0208 635a173
chore: 테스트 컨테이너 설정 클래스 제거
hyeon0208 c9cc986
chore: 테스트 컨테이너 의존성 제거
hyeon0208 ba34a94
chore: ci/cd 스크립트 타임존 설정 및 시간 체크
hyeon0208 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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 |
---|---|---|
@@ -1,76 +1,77 @@ | ||
plugins { | ||
id 'java' | ||
id 'jacoco' //테스트 커버리지 검증 라이브러리 추가 | ||
id 'org.springframework.boot' version '3.3.1' | ||
id 'io.spring.dependency-management' version '1.1.5' | ||
id 'java' | ||
id 'jacoco' //테스트 커버리지 검증 라이브러리 추가 | ||
id 'org.springframework.boot' version '3.3.1' | ||
id 'io.spring.dependency-management' version '1.1.5' | ||
id 'com.palantir.docker-compose' version '0.36.0' | ||
} | ||
|
||
group = 'com.ody' | ||
version = '0.0.1-SNAPSHOT' | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
} | ||
|
||
dockerCompose { | ||
dockerComposeFile 'docker-compose-local.yml' | ||
} | ||
|
||
jacoco { | ||
toolVersion = '0.8.8' | ||
toolVersion = '0.8.8' | ||
} | ||
|
||
jacocoTestReport { | ||
jacocoTestReport { | ||
reports { | ||
xml.required.set(true) | ||
csv.required.set(false) | ||
html.required.set(true) | ||
} | ||
} | ||
reports { | ||
xml.required.set(true) | ||
csv.required.set(false) | ||
html.required.set(true) | ||
} | ||
} | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'com.google.firebase:firebase-admin:9.2.0' | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' | ||
implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5' | ||
implementation 'org.springframework.boot:spring-boot-starter' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
implementation "io.jsonwebtoken:jjwt:0.9.1" | ||
implementation 'javax.xml.bind:jaxb-api:2.3.1' | ||
implementation 'org.springframework.boot:spring-boot-starter-actuator' | ||
|
||
runtimeOnly 'com.mysql:mysql-connector-j:8.4.0' | ||
runtimeOnly 'com.h2database:h2' | ||
implementation 'com.google.firebase:firebase-admin:9.2.0' | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' | ||
implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5' | ||
implementation 'org.springframework.boot:spring-boot-starter' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
implementation "io.jsonwebtoken:jjwt:0.9.1" | ||
implementation 'javax.xml.bind:jaxb-api:2.3.1' | ||
implementation 'org.springframework.boot:spring-boot-starter-actuator' | ||
implementation 'org.flywaydb:flyway-mysql' | ||
implementation 'org.flywaydb:flyway-core' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'io.rest-assured:rest-assured:5.3.1' | ||
runtimeOnly 'com.mysql:mysql-connector-j:8.4.0' | ||
|
||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
testRuntimeOnly 'com.h2database:h2' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'io.rest-assured:rest-assured:5.3.1' | ||
|
||
annotationProcessor 'org.projectlombok:lombok' | ||
compileOnly 'org.projectlombok:lombok' | ||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
testRuntimeOnly 'com.h2database:h2' | ||
|
||
implementation 'org.flywaydb:flyway-mysql' | ||
implementation 'org.flywaydb:flyway-core' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
compileOnly 'org.projectlombok:lombok' | ||
} | ||
|
||
tasks.named('test') { | ||
useJUnitPlatform() | ||
finalizedBy jacocoTestReport | ||
useJUnitPlatform() | ||
finalizedBy jacocoTestReport | ||
} | ||
|
||
configurations.all { | ||
exclude group: 'commons-logging', module: 'commons-logging' | ||
exclude group: 'commons-logging', module: 'commons-logging' | ||
} |
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,12 @@ | ||
services: | ||
db: | ||
image: mysql:8.0.35 | ||
container_name: mysql-local-db | ||
restart: always | ||
ports: | ||
- "53306:3306" | ||
environment: | ||
MYSQL_ROOT_HOST: '%' | ||
MYSQL_ROOT_PASSWORD: 1234 | ||
MYSQL_DATABASE: ody | ||
TZ: Asia/seoul |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
4 changes: 3 additions & 1 deletion
4
backend/src/main/resources/db/migration/V2__alter_notification_type_check.sql
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
ALTER TABLE notification ADD CONSTRAINT notification_chk_1 CHECK (notification.type IN ('DEPARTURE_REMINDER', 'ENTRY', 'NUDGE', 'MEMBER_DELETION', 'ETA_NOTICE')); | ||
ALTER TABLE notification DROP CONSTRAINT notification_chk_1; | ||
|
||
ALTER TABLE notification ADD CONSTRAINT notification_chk_1 CHECK (`type` IN ('DEPARTURE_REMINDER', 'ENTRY', 'NUDGE', 'MEMBER_DELETION', 'ETA_NOTICE')); |
12 changes: 6 additions & 6 deletions
12
backend/src/main/resources/db/migration/V3__alter_character_set.sql
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*! ALTER DATABASE ody CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; */ | ||
/*! ALTER TABLE member CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ | ||
/*! ALTER TABLE meeting CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ | ||
/*! ALTER TABLE mate CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ | ||
/*! ALTER TABLE notification CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ | ||
/*! ALTER TABLE eta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ | ||
ALTER DATABASE ody CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; | ||
ALTER TABLE member CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
ALTER TABLE meeting CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
ALTER TABLE mate CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
ALTER TABLE notification CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
ALTER TABLE eta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
20 changes: 10 additions & 10 deletions
20
backend/src/main/resources/db/migration/V5__alter__timestamp__set-nano.sql
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/*! ALTER TABLE member MODIFY COLUMN deleted_at timestamp(6); */ | ||
/*! ALTER TABLE meeting MODIFY COLUMN created_at timestamp(6); */ | ||
/*! ALTER TABLE meeting MODIFY COLUMN updated_at timestamp(6); */ | ||
/*! ALTER TABLE mate MODIFY COLUMN deleted_at timestamp(6); */ | ||
/*! ALTER TABLE eta CHANGE COLUMN created_at first_api_call_at timestamp not null; */ | ||
/*! ALTER TABLE eta CHANGE COLUMN updated_at last_api_call_at timestamp not null; */ | ||
/*! ALTER TABLE eta MODIFY COLUMN deleted_at timestamp(6); */ | ||
/*! ALTER TABLE notification MODIFY COLUMN send_at timestamp(6); */ | ||
/*! ALTER TABLE notification MODIFY COLUMN created_at timestamp(6); */ | ||
/*! ALTER TABLE notification MODIFY COLUMN updated_at timestamp(6); */ | ||
ALTER TABLE member MODIFY COLUMN deleted_at timestamp(6); | ||
ALTER TABLE meeting MODIFY COLUMN created_at timestamp(6); | ||
ALTER TABLE meeting MODIFY COLUMN updated_at timestamp(6); | ||
ALTER TABLE mate MODIFY COLUMN deleted_at timestamp(6); | ||
ALTER TABLE eta CHANGE COLUMN created_at first_api_call_at timestamp not null; | ||
ALTER TABLE eta CHANGE COLUMN updated_at last_api_call_at timestamp not null; | ||
ALTER TABLE eta MODIFY COLUMN deleted_at timestamp(6); | ||
ALTER TABLE notification MODIFY COLUMN send_at timestamp(6); | ||
ALTER TABLE notification MODIFY COLUMN created_at timestamp(6); | ||
ALTER TABLE notification MODIFY COLUMN updated_at timestamp(6); |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[질문]
사용을 안 하고 있는것 같은데 맞을까요? 제거부탁드려요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모든 job들에 타임존 설정이 적용되고 있어서
시간 계산 로직으로 인한 사이드 이펙트 방지로 들어가면 좋을꺼같아요 !