Adjusted flyway logging
This commit is contained in:
parent
d70238d3e0
commit
d27d37c4db
@ -71,15 +71,26 @@ class FlywayAutoConfig(
|
|||||||
.load()
|
.load()
|
||||||
|
|
||||||
val pending = flyway.info().pending()
|
val pending = flyway.info().pending()
|
||||||
if (pending.isEmpty()) {
|
|
||||||
log.info("⚠️ No pending Flyway migrations found in ${locations.joinToString()}")
|
when {
|
||||||
} else {
|
pending.isEmpty() -> {
|
||||||
log.info("📦 Pending migrations: ${pending.joinToString { it.script }}")
|
log.info("ℹ️ Flyway is up to date. No migrations to apply.")
|
||||||
}
|
}
|
||||||
|
|
||||||
flyway.migrate()
|
else -> {
|
||||||
log.info("✅ Flyway migration complete.")
|
log.info("📦 Pending migrations: ${pending.joinToString { it.script }}")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val result = flyway.migrate()
|
||||||
|
|
||||||
|
if (result.migrationsExecuted > 0) {
|
||||||
|
log.info("✅ Applied ${result.migrationsExecuted} migration(s).")
|
||||||
|
} else {
|
||||||
|
log.info("ℹ️ No migrations were applied.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigurationProperties(prefix = "spring.flyway")
|
@ConfigurationProperties(prefix = "spring.flyway")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user