feature #15: fix migration test if run twice

This commit is contained in:
2019-07-06 00:16:12 +02:00
parent 6dc5e611aa
commit b00f8cb5d0
5 changed files with 63 additions and 18 deletions

View File

@@ -7,7 +7,7 @@ import java.io.File
import java.util.*
import fr.postgresjson.definition.Function as DefinitionFunction
class Function(
data class Function(
val up: DefinitionFunction,
val down: DefinitionFunction,
private val connection: Connection,
@@ -26,8 +26,8 @@ class Function(
up: String,
down: String,
connection: Connection,
executedAt: Date? = null):
this(
executedAt: Date? = null
): this(
DefinitionFunction(up),
DefinitionFunction(down),
connection,
@@ -74,4 +74,10 @@ class Function(
return Status.OK // TODO
}
fun copy(): Function {
return this.copy(up = up, down = down, connection = connection, executedAt = executedAt).also {
it.doExecute = this.doExecute
}
}
}