Play database migration not working when upgrading from 2.3 to 2.7

14 views
Skip to first unread message

Olivier Poppon

unread,
May 15, 2019, 3:43:25 AM5/15/19
to ScalikeJDBC Users Group
Hello,

(Note : My error is similar to one posted by Toby Hobson in 2016, but it was for Play 2.5 it was not mentionning database migration)

I have migrated a Play 2.3 application to 2.7.
In the process, Play lost the ability to perform database migrations (using the built-in evolution functionnality, not flyway)

To do so, in build.sbt, I added the evolutions dependency, but now I have a No implementation for play.api.db.DBApi was bound error.

Can you see if I am missing something ?

Thanks a lot !

build.sbt -2.3
libraryDependencies ++= Seq(
"org.scalikejdbc"    %% "scalikejdbc"                % "2.4.+",
  "org.scalikejdbc"    %% "scalikejdbc-config"         % "2.4.+",
"org.scalikejdbc"    %% "scalikejdbc-play-plugin"    % "2.3.+"
)

build.sbt - 2.7
libraryDependencies ++= Seq(
guice,
evolutions,
"org.scalikejdbc"    %% "scalikejdbc"                    % "3.3.2",
"org.scalikejdbc"    %% "scalikejdbc-config"            % "3.3.2",
"org.scalikejdbc"    %% "scalikejdbc-play-initializer"         % "2.7.0-scalikejdbc-3.3"
)

application.conf - 2.7
play.modules {
enabled += "scalikejdbc.PlayModule"
disabled += "play.api.db.DBModule"  
}

play.evolutions.db.enabled=true
play.evolutions.db.autoApply=true



Olivier Poppon

unread,
May 20, 2019, 8:30:08 AM5/20/19
to ScalikeJDBC Users Group
Never mind.

It was getting too complicated. I switch to flyway...
Reply all
Reply to author
Forward
0 new messages