You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Entity 작성
2. SQL 마이그레이션 파일 작성
3. 로컬 검증 (./gradlew flywayMigrate)
4. Git commit & push
5. Dev/Prod 배포 → 자동으로 DB 생성!
migration 파일 작성 규칙
src/main/resources/db/migration/
├── V1__create_place_types_table.sql
├── V2__insert_initial_place_types.sql
├── V3__create_events_table.sql
└── V4__create_event_place_types_table.sql
V{버전}__{설명}.sql
│ │ └─ 더블 언더스코어 (__) 필수!
│ └─ 버전 번호 (1, 2, 3...)
└─ 대문자 V 필수!
dev 환경에서 마이그레이션이 꼬였을때
DROP TABLE IF EXISTS event_place_types;
DROP TABLE IF EXISTS events;
DROP TABLE IF EXISTS place_types;
... //기존 테이블 다 지우고
DROP TABLE IF EXISTS flyway_schema_history;