From 175d88b67180a09a08815202e598e922c294e61f Mon Sep 17 00:00:00 2001 From: Naftoli Gugenheim Date: Tue, 26 Feb 2019 15:46:59 -0500 Subject: [PATCH] fix tests --- src/main/scala/slick/migration/api/Dialect.scala | 2 +- src/test/scala/slick/migration/api/DbTest.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/slick/migration/api/Dialect.scala b/src/main/scala/slick/migration/api/Dialect.scala index 5e1ff2d6..f8d0ce21 100644 --- a/src/main/scala/slick/migration/api/Dialect.scala +++ b/src/main/scala/slick/migration/api/Dialect.scala @@ -153,7 +153,7 @@ class Dialect[-P <: JdbcProfile] extends AstHelpers { case AddColumnAndSetInitialValue(info, expr) :: rest => addColumnWithInitialValue(table, info, expr) ::: loop(rest) case DropColumn(info) :: rest => dropColumn(table, info.name) :: loop(rest) case DropColumnOfName(name) :: rest => dropColumn(table, name) :: loop(rest) - case RenameColumnTo(originalInfo, to) :: rest => renameColumn(table, originalInfo.name, to) :: loop(rest) + case RenameColumnTo(originalInfo, to) :: rest => renameColumn(table, originalInfo, to) :: loop(rest) case RenameColumnFrom(currentInfo, from) :: rest => renameColumn(table, from, currentInfo.name) :: loop(rest) case AlterColumnDefault(info) :: rest => alterColumnDefault(table, info) :: loop(rest) case AlterColumnNullable(info) :: rest => alterColumnNullability(table, info) :: loop(rest) diff --git a/src/test/scala/slick/migration/api/DbTest.scala b/src/test/scala/slick/migration/api/DbTest.scala index 6b955638..2e9f80b5 100644 --- a/src/test/scala/slick/migration/api/DbTest.scala +++ b/src/test/scala/slick/migration/api/DbTest.scala @@ -197,7 +197,7 @@ abstract class DbTest[P <: JdbcProfile](val tdb: JdbcTestDB { val profile: P })( } finally tdb.blockingRunOnSession(implicit ec => tm7.drop()) - tm.rename("table7").reverse should equal (tm7.rename("old_name")) + tm.rename("table7").reverse.actions should equal (tm7.renameFrom("table7").actions) } } @@ -435,6 +435,6 @@ trait CompleteDbTest { this: DbTest[_ <: JdbcProfile] => } finally tdb.blockingRunOnSession(implicit ec => tm.drop()) - tm.renameColumn(_.col1, "col1").reverse should equal (tm.renameColumn(_.column[Long]("col1"), "old_name")) + tm.renameColumn(_.col1, "col1").reverse should equal (tm.renameColumnFrom("col1", _.col1)) } }