Plugins - Independent Migrations

StarAdd to favorites

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. 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.

Courtenay

http://blog.caboo.se/articles/2007/3/27/independent-migrations-plugin

svn://caboo.se/plugins/court3nay/independent_migrations

  • Currently 4.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Misc. Enhancements

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?