Independent Migrations plugin

Plugin details

In simple terms, here’s what it does. To paraphrase zenspider, if two migrations have the same number, Rails will bitch at you. This plugin removes the bitching.

Websitehttp://agilewebdevelopment.com/plugins/independent_migrations Repositorysvn://caboo.se/plugins/court3nay/independent_migrations Author Courtenay Tags migration LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install svn://caboo.se/plugins/court3nay/independent_migrations

To get it working, install, then edit your migrations so they look like this

class AddProject < ActiveRecord::IndependentMigration


That’s it. Now your migration directory can look something like

002_add_project.rb
002.add_monkeys.rb
003.fix_monkeys.rb


and as long as all 002 are independent, then the migration will run. This patch is only guaranteed for Rails 1.2.3 and may change as ActiveRecord changes as it relies heavily on monkeypatching (or reopening classes, as David Black would have you believe) some private methods.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 9 months ago