Consolidate evolutions

I have used Play Evolution for a project that has grown quite large, and I am about to write script 40.sql.
Would there be a way to consolidate files 1 to 30, from which I am pretty sure I will never backtrack to, into one “clean”, large SQL script without messing up the database?

Meta data of evolutions are stored in the table play_evolutions.
If you run select * from play_evolutions you will see it should contain 40 entries, one entry for each evolution file.

What you can do is:

  1. Copy all the evolutions from file 1.sql-30.sql into 1.sql
  2. Set up a new, fresh database, run the evolutions against that new clean database
  3. If you have a look in the play_evolutions table of the new database you will see it just has 11 entries (the big one and the other 10 from the original 40)
  4. In your original database replace the play_evolutions table with the table from the new database.
  5. You can now drop the new database.

I hope you get what I mean.