scalaplayframeworkslickplayframework-evolutions

How do you delete an evolution in Play?


In Play (scala) I have a number of evolutions in conf/evolutions/default called 1.sql, 2.sql etc...

Some of these are from playing around, and some are from tutorial code I no longer use.

How do I get rid of these evolutions?

The obvious approach of deleting the evolution files does not seem to work. If you remove the file, the evolution is still applied. Altering the file works, and so the current workaround is emptying the .sql files when they are longer required.


Solution

  • In virtually every migration framework/library/approach it works the same:

    I cannot stress this enough - if you deployed you code anywhere, do not remove the migration. Hell can break loose. But it you haven't deployed it anywhere, because it's e.g. just a tutorial, just drop the database and do whatever you want.