Skip to content
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

[BE] feat: Flyway 적용 (#246) #334

Merged
merged 12 commits into from
Sep 11, 2023
Merged

[BE] feat: Flyway 적용 (#246) #334

merged 12 commits into from
Sep 11, 2023

Conversation

seokjin8678
Copy link
Collaborator

📌 관련 이슈

✨ PR 세부 내용

로컬 환경에서는 mysql으로 db를 사용하도록 했습니다.
따라서 mysql을 실행시켜야 로컬 실행이 가능합니다.
docker 디렉터리의 docker-compose.yml을 사용하여 mysql 실행이 가능하니 참고 바랍니다.

테스트 환경에서 h2를 mysql 모드로 실행하여 mysql 문법을 사용할 수 있지만, alter 문에서 일부 문법 호환이 되지 않는 이슈가 있어서, flyway 적용을 하지 않았습니다.

DDL이 현재 #273 이슈 기준 dev 브랜치의 엔티티로 매핑되어 있어 추후 컬럼의 값이 변하면 수정이 필요합니다.

@seokjin8678 seokjin8678 added BE 백엔드에 관련된 작업 🏢 인프라 인프라에 관련된 작업 labels Aug 11, 2023
@seokjin8678 seokjin8678 self-assigned this Aug 11, 2023
@seokjin8678 seokjin8678 linked an issue Aug 11, 2023 that may be closed by this pull request
@seokjin8678 seokjin8678 marked this pull request as ready for review August 11, 2023 06:02
@github-actions
Copy link

github-actions bot commented Aug 11, 2023

Unit Test Results

  61 files    61 suites   11s ⏱️
178 tests 178 ✔️ 0 💤 0
181 runs  181 ✔️ 0 💤 0

Results for commit d908375.

♻️ This comment has been updated with latest results.

Copy link
Member

@xxeol2 xxeol2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고많으셨습니다 🪽

Comment on lines +1 to +15
version: "3.8"
services:
db:
image: mysql:8.0.33
container_name: festago-local-db
restart: always
ports:
- "13306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: festago
MYSQL_USER: festago
MYSQL_PASSWORD: festago
TZ: Asia/Seoul
command: [ "mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_general_ci" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

내마음이 도커도커

Copy link
Member

@BGuga BGuga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감동적인 Flyway 입니다 추후에 코드 롤백과 DB 롤백 전략에 대해서 같이 이야기 해보면 좋을 것 같네요!!

Comment on lines +1 to +15
version: "3.8"
services:
db:
image: mysql:8.0.33
container_name: festago-local-db
restart: always
ports:
- "13306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: festago
MYSQL_USER: festago
MYSQL_PASSWORD: festago
TZ: Asia/Seoul
command: [ "mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_general_ci" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h2 의 문법 문제와 dev, prod 환경과 최대한 비슷한 환경을 local 에서 구성해 보는 것도 큰 장점인 것 같네요!!

Copy link
Collaborator

@carsago carsago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인하였습니다 굿

@seokjin8678 seokjin8678 marked this pull request as draft August 15, 2023 17:23
@seokjin8678
Copy link
Collaborator Author

Validation, Admin 엔티티 추가로 인해 테이블 변경이 있을 것이라 판단하고 올라온 PR 중 DDL 변경이 없을 때 해당 사항 반영 후 머지 하겠습니다!

@seokjin8678 seokjin8678 marked this pull request as ready for review September 11, 2023 08:20
@seokjin8678 seokjin8678 merged commit c679560 into dev Sep 11, 2023
3 checks passed
@seokjin8678 seokjin8678 deleted the feat/#246 branch September 11, 2023 08:25
BGuga pushed a commit that referenced this pull request Oct 17, 2023
* chore: Flyway 의존성 추가

* chore: Flyway 설정 추가

* chore: 서브모듈 업데이트

* chore: h2 설정 제거

* feat: 최신 브랜치 반영

* feat: Admin 테이블 추가

* feat: 최신 엔티티 DDL 설정

* feat: submodule 업데이트
BGuga pushed a commit that referenced this pull request Oct 17, 2023
* chore: Flyway 의존성 추가

* chore: Flyway 설정 추가

* chore: 서브모듈 업데이트

* chore: h2 설정 제거

* feat: 최신 브랜치 반영

* feat: Admin 테이블 추가

* feat: 최신 엔티티 DDL 설정

* feat: submodule 업데이트
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드에 관련된 작업 🏢 인프라 인프라에 관련된 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] Flyway를 적용한다.
4 participants