fix init data with flyway and fix init data with flyway in docker-compose

This commit is contained in:
liosha84
2025-06-17 17:26:21 +03:00
parent 426717cb99
commit 271de2e3c0
14 changed files with 148 additions and 107 deletions
+11 -1
View File
@@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.5.0'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.flywaydb.flyway' version '10.4.1'
}
group = 'com.jambotronGroup'
@@ -21,7 +22,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.projectlombok:lombok:1.18.26'
implementation 'org.projectlombok:lombok:1.18.26'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
@@ -56,6 +56,16 @@ tasks.register('copyResources', Copy) {
}
processResources.dependsOn(copyResources)
compileJava.dependsOn(copyResources)
//bootRun.dependsOn("flywayMigrate")
//flyway {
// user='admin'
// password= 'postgrespw'
// url = 'jdbc:postgresql://localhost:5432/jambotronDB'
// driver = 'org.postgresql.Driver'
// baselineOnMigrate = true
// locations = ['filesystem:src/main/resources/db.migration/']
//}
sourceSets {
main {