Skip to content

Commit

Permalink
Fix schema_evolution version (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordshinjo authored and dufrannea committed Aug 8, 2017
1 parent 2c9e8ea commit 15a407d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/com/criteo/cuttle/Database.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private[cuttle] object Database {
SELECT MAX(schema_version) FROM schema_evolutions
""".query[Option[Int]].unique.map(_.getOrElse(0))

_ <- schemaEvolutions.map(_.update).drop(currentSchemaVersion).zipWithIndex.foldLeft(NoUpdate) {
_ <- schemaEvolutions.map(_.update).zipWithIndex.drop(currentSchemaVersion).foldLeft(NoUpdate) {
case (evolutions, (evolution, i)) =>
evolutions *> evolution.run *> sql"""
INSERT INTO schema_evolutions (schema_version, schema_update)
Expand Down

0 comments on commit 15a407d

Please sign in to comment.