Files
Hanbin Lee 49e19666b2 [#41] feat: 카페 검색 api 수정
- 프론트 테스트겸 카페 검색 api 수정(이름 조건 추가)
- security 설정 관련 내용 수정(파일 이동)
- flyway seed data 내용 수정(image)
2023-04-08 00:09:18 +09:00
..
2023-04-08 00:09:18 +09:00

DB Migration


📌 Installation(Local)

LOCAL 환경에 해당

$ brew install flyway
  • macOS 전용

📌 Flyway Command

  • Clean
    Drops all objects (tables, views, procedures, triggers, …) in the configured schemas
    (prodution 단계에서는 절대 사용 X)
$ flyway clean -configFiles=db/flyway.conf
  • Info
    Prints the details and status information about all the migrations
$ flyway info -configFiles=db/flyway.conf
  • Migrate
    Migrates the schema to the latest version migration 설정 내용들 반영
$ flyway migrate -configFiles=db/flyway.conf
  • Validate
    Validates the applied migrations against the available ones
    DB에 적용된 migration과 local에 적용된 migration 정보 일치 여부 체크
$ flyway validate -configFiles=db/flyway.conf

📌 Migration for Local Env

$ cd [PROJECT_ROOT_DIR]

$ chmod 755 ./script/migration-local.sh
$ ./script/migration-local.sh

project의 root directory로 이동하는 것이 중요