ENT-8826 Upgrade Liquibase to latest version - more review feedback (#7279)

This commit is contained in:
Mahmoud Almahroum
2023-03-10 14:28:40 +00:00
committed by GitHub
parent 1a0d354903
commit 021c70143b
2 changed files with 4 additions and 6 deletions

View File

@ -154,25 +154,23 @@ open class SchemaMigration(
if (path == dynamicInclude) {
// Return the json as a stream.
val inputStream = getPathAsStream()
val resource = object : URIResource(path, URI(path)) {
override fun openInputStream(): InputStream {
return inputStream
return getPathAsStream()
}
}
return Collections.singletonList(resource)
}
// Take 1 resource due to LiquidBase find duplicate files which throws an error
// Take 1 resource due to Liquibase find duplicate files which throws an error
return super.getAll(path).take(1)
}
override fun get(path: String?): Resource {
if (path == dynamicInclude) {
// Return the json as a stream.
val inputStream = getPathAsStream()
return object : URIResource(path, URI(path)) {
override fun openInputStream(): InputStream {
return inputStream
return getPathAsStream()
}
}
}