This commit is contained in:
2022-10-15 00:38:54 +02:00
parent a2b8483967
commit dab7358e39
4 changed files with 6 additions and 6 deletions

View File

@@ -130,7 +130,7 @@ class Migrations private constructor(
enum class Direction { UP, DOWN }
internal class DownMigrationNotDefined(path: String, cause: FileNotFoundException? = null) :
Throwable("The file $path whas not found", cause)
Throwable("The file $path was not found", cause)
fun addFunction(newDefinition: DefinitionFunction, callback: (Function) -> Unit = {}): Migrations {
val currentFunction = functions[newDefinition.name]
@@ -174,10 +174,10 @@ class Migrations private constructor(
private fun initDB() {
if (!initialized) {
this::class.java.classLoader.getResource("sql/migration/createHistoryShema.sql")!!.readText().let {
this::class.java.classLoader.getResource("sql/migration/createHistorySchema.sql")!!.readText().let {
connection.sendQuery(it)
}
this::class.java.classLoader.getResource("sql/migration/createFunctionShema.sql")!!.readText().let {
this::class.java.classLoader.getResource("sql/migration/createFunctionSchema.sql")!!.readText().let {
connection.sendQuery(it)
}
initialized = true