1
votes

I am using play and using slick . After migrating to slick when ever i am starting the server with play run each time play tries to drop and recreate tables saying "Database 'default' needs evolution!"

Even though there are not changes to my DB and server. Is there any way to configure this so that tables wont get dropped each time.

using play 2.1.0 and https://github.com/freekh/play-slick

3

3 Answers

1
votes

If you want to disable evolutions you can either update your configuration file with: applyEvolutions.default=false or add it on the command line: play run -DapplyEvolutions.default=true

1
votes

This is probably play-slick creating a conf/evolutions/default/1.sql which it only does if it doesn’t exist, and if it isn’t disabled with the configuration evolutionplugin=false. I would guess that you are still changing your table mappings in the Scala code, which means that the database changes.

The solution as applyEvolutions.default=false, as Fredrik already said, or to maintain your own evolutions file so that play-slick won't generate one.

0
votes

Look to /conf if there is /evolutions directory with database evolutions and try to delete this evolutions folder.