mirror of
https://github.com/corda/corda.git
synced 2025-02-21 01:42:24 +00:00
ENT-8826 Upgrade Liquibase to latest version - more review feedback (#7279)
This commit is contained in:
parent
1a0d354903
commit
021c70143b
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class IdenityServiceKeyRotationMigrationTest {
|
||||
|
||||
Liquibase("migration/node-core.changelog-v20.xml", object : ClassLoaderResourceAccessor() {
|
||||
override fun getAll(path: String?): List<Resource> {
|
||||
return super.getAll(path).take(1).toList()
|
||||
return if(path != null) super.getAll(path).take(1).toList() else emptyList()
|
||||
}
|
||||
}, liquibaseDB).update(Contexts().toString())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user