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

@@ -6,7 +6,7 @@ import fr.postgresjson.migration.Migration.Action
import java.io.File
import java.util.*
class Query(
data class Query(
val name: String,
val up: String,
val down: String,
@@ -57,4 +57,10 @@ class Query(
return Migration.Status.OK // TODO
}
fun copy(): Query {
return this.copy(name = name, up = up, down = down, connection = connection, executedAt = executedAt).also {
it.doExecute = this.doExecute
}
}
}