jodosha / plugin_migrations

Rake tasks for running plugin migrations.

This URL has Read+Write access

name age message
file MIT-LICENSE Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
file README Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
file Rakefile Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
file init.rb Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
file install.rb Wed Mar 11 02:32:07 -0700 2009 Specify installation note [jodosha]
directory lib/ Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
directory tasks/ Tue Mar 03 11:16:18 -0800 2009 Run migrations from plugins first, then from ap... [jodosha]
directory test/ Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
file uninstall.rb Sat Feb 28 10:14:32 -0800 2009 First commit [jodosha]
README
PluginMigrations
================

Rake tasks for running plugin migrations.


Usage
=====

$ rake db:migrate                                                  # Migrate application and plugins
$ rake db:migrate:application                                      # Migrate only the application
$ rake db:migrate:plugins                                          # Migrate all the plugins
$ rake db:migrate:plugins PLUGIN=foo                               # Migrate "foo"
$ rake db:migrate:plugins PLUGIN=foo PLUGIN_VERSION=1              # Migrate "foo" to version 1
$ rake db:migrate:plugins PLUGIN=foo PLUGIN_VERSION=20090228035457 # Migrate "foo" to version 20090228035457
$ rake db:migrate:plugins:down PLUGIN=foo PLUGIN_VERSION=1         # Migrate down "foo" to version 1
$ rake db:migrate:plugins:up PLUGIN=foo PLUGIN_VERSION=1           # Migrate up "foo" to version 1
$ rake db:migrate:redo                                             # Migrate again the last step from the application
$ rake db:migrate:reset                                            # Migrate down then up migrations from application 
and plugins
$ rake db:rollback                                                 # Migrate down the application of one step
$ rake db:rollback STEP=3                                          # Migrate down the application of three steps
$ rake db:migrate:up VERSION=1                                     # Migrate up the application to version 1
$ rake db:migrate:down VERSION=1                                   # Migrate down the application to version 1
$ rake db:plugins:redo PLUGIN=foo                                  # Migrate again the last step for "foo"
$ rake db:plugins:reset PLUGIN=foo                                 # Migrate down then up migrations from "foo"
$ rake db:plugins:rollback PLUGIN=foo                              # Migrate down "foo" of one step
$ rake db:plugins:rollback PLUGIN=foo STEP=3                       # Migrate down "foo" of three steps
$ rake db:version                                                  # Print the application version value
$ rake db:plugins:version PLUGIN=foo                               # Print the "foo" version value


When you need to rename a plugin, run:

$ script/plugin rename cached-models cached_models



Copyright (c) 2009 Luca Guidi, released under the MIT license