Skip to content

Commit

Permalink
#60 Fix migration entity rename
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 9, 2018
1 parent d3d985f commit 23f764a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/org/elastic4play/services/MigrationSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ class MigrationSrv @Inject() (
trait Operation extends ((String Source[JsObject, NotUsed]) (String Source[JsObject, NotUsed]))
object Operation {
def apply(o: (String Source[JsObject, NotUsed]) String Source[JsObject, NotUsed]) = new Operation {
def apply(f: (String Source[JsObject, NotUsed])): (String) Source[JsObject, NotUsed] = o(f)
def apply(f: String Source[JsObject, NotUsed]): String Source[JsObject, NotUsed] = o(f)
}
def renameEntity(previous: String, next: String): Operation = Operation((f: String Source[JsObject, NotUsed]) {
case `next` f(previous)
case `next` f(previous).map(_ + ("_type" -> JsString(next)))
case "audit" f("audit").map { x
(x \ "objectType").asOpt[String] match {
case Some(`previous`) x - "objectType" + ("objectType" JsString(next))
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version := "1.5.1-SNAPSHOT"
version := "1.6.0-SNAPSHOT"

0 comments on commit 23f764a

Please sign in to comment.