Skip to content

Commit 2a13226

Browse files
committed
feat: flyway 적용
1 parent bf97c81 commit 2a13226

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

backend/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ dependencies {
3737

3838
/* DATABASE */
3939
runtimeOnly 'com.mysql:mysql-connector-j'
40+
implementation 'org.flywaydb:flyway-mysql'
41+
implementation 'org.flywaydb:flyway-core'
4042

4143
/* MONITORING */
4244
implementation 'io.micrometer:micrometer-registry-prometheus'

backend/src/main/resources/application.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ spring:
1616
username: ${DB_USERNAME}
1717
password: ${DB_PASSWORD}
1818

19+
flyway:
20+
enabled: false
21+
1922
data:
2023
redis:
2124
host: ${REDIS_HOST}
@@ -78,6 +81,9 @@ spring:
7881
activate:
7982
on-profile: dev
8083

84+
flyway:
85+
enabled: false
86+
8187
management:
8288
server:
8389
port: ${ACTUATOR_PORT}
@@ -95,11 +101,16 @@ spring:
95101
activate:
96102
on-profile: prod
97103

104+
flyway:
105+
enabled: true
106+
locations: classpath:db/migration
107+
98108
sql:
99109
init:
100110
mode: never
101111

102112
jpa:
113+
defer-datasource-initialization: false
103114
hibernate:
104115
ddl-auto: none
105116

backend/src/test/resources/application.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ spring:
1515
init:
1616
mode: never
1717

18+
flyway:
19+
enabled: false
20+
1821
security:
1922
oauth2:
2023
client:

0 commit comments

Comments
 (0)