Created
September 24, 2010 05:02
-
-
Save wesgarrison/594886 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddFieldToUser < ActiveRecord::Migration | |
def self.up | |
ActiveRecord::Base.establish_connection "user_#{Rails.env}" | |
add_column :users, :field, :type | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you get around your main db trying to migrate every time? (i.e. this particular migration's version number will get added to this database's schema_migrations table, but not the primary one targeted in the standard rake db:migrate task)