MigrateWar
==========
Simple Rails plugin to enable migrations to be run just after the rails application loads by using the
ServletContext in a JRuby/Goldspike environment. This simulates the capistrano deploy and migrate workflow.
Consists of a ServletContextListener which executes a migration when the context (i.e. the rails application) loads.
SVN repository is at
http://svn.silverchairsolutions.com/migrate_war
Author: Mike Hagedorn (mike@silverchairsolutions.com)
Installing the ContextListener
------------------------------
add the following to your web.xml. This will pull your code into the war file and make it execute on load
org.jruby.webapp.MigratorContextListener
command-file
migrator.rb
Run this file to execute an initial migration (for deployment to new platforms)
Note that this will apply the schema to the production database, blowing away the previous contents, so back up your data before redeploying. If you what to disable the schema.rb stuff, you can either a) remove the listener definition from the web.xml or b) comment out the load comment in the migrator.rb file.
Alternatively, you could expand the migrator.rb logic and import data from fixtures or something
Copyright (c) 2008 Mike Hagedorn, http://www.silverchairsolutions.com, released under the MIT license