SqlSources

internal object SqlSources

The two places .sql migrations come from, behind one call.

They are separate implementations rather than one made to stretch. ClassGraph earns its place on the classpath, where a path can mean a jar inside a jar, the module path or a Spring Boot fat jar - and earns nothing over Files.walk on a plain directory, where it would also swallow the one answer that directory owes the caller: that it is not there.

Properties

Link copied to clipboard
const val SUFFIX: String

What a migration file is called. Fixed, like the V, R and __ of the naming rule and for the same reason: every spelling of it is API to keep working, and PostgreSQL does not care either way.

Functions

Link copied to clipboard
fun findAll(locations: List<String>, classLoader: ClassLoader?): List<FoundFile>

Every migration file in locations, in no particular order - ordering is decided later, by version.