playframework/Play20 — pull request #567 by brikis98 (2012-11-22 02:10:09+00:00)
Title: #844: The evolutions web command shouldn't use OfflineEvolutions

Fix for [#844](https://play.lighthouseapp.com/projects/82401-play-20/tickets/844).

This pull request makes the Evolutions web commands use `Evolutions.applyScript` and `Evolutions.resolve` directly instead of going through the `OfflineEvolutions` code.

The primary motivator is that the `OfflineEvolutions` code (by design) does not take into account any configuration that can come in through `Global.configuration`. On the other hand, the `EvolutionsPlugin.onStart` code *does* take it into account. If the `Global.configuration` has an DB config in it, you may repeatedly get prompted to apply evolutions, but it'll never actually work.

As a test, I added db config data to the `configuration` method of `Global.scala` in `integrationtest`. Before the patch, the web UI would prompt you to apply evolutions, but wouldn't actually be able to do it when you click the button, so you'd just get stuck in an infinite loop in that page. After the patch, it applies evolutions as expected.