What exactly does play-slick-evolutions do?

58 views
Skip to first unread message

Asa Zernik

unread,
Jun 24, 2015, 11:02:11 PM6/24/15
to scala...@googlegroups.com
(Re-written now that I've remembered that Markdown is not used on everything on the web)

The github page has only the following singularly unenlightening sentence of documentation:

If you would like to use Play evolutions with Slick, add also the following module:
"com.typesafe.play" %% "play-slick-evolutions" % "1.0.0"

The documentation page linked to from that repository doesn't add much:

Support for Play database evolutions
Play Slick supports Play database evolutions.
To enable evolutions, you will need the following dependencies:
"com.typesafe.play" %% "play-slick" % "1.0.0"
"com.typesafe.play" %% "play-slick-evolutions" % "1.0.0"
Note there is no need to add the Play evolutions component to your dependencies, as it is a transitive dependency of the play-slick-evolutions module.

What exactly does "support" mean? Does play-slick-evolutions automatically run slick-codegen to match an evolved database? Does it generate evolutions in response to slick class changes?

From the sample projects, it seems that the end state is a directory tree with both a conf/evolutions/default directory containing raw-SQL definitions of the schema, and an app/tables directory containing Table[_] subclasses. Is one or the other of these generated? if not, what role does play-slick-evolutions actually play?

Thanks a lot,

Asa
Reply all
Reply to author
Forward
0 new messages