Virendra Negi wrote:
> my main rails application has a connection to two databases
> 1> main_development
> 2> secondary_development
>
> Know suppose i have to create a new migration for my secondary database
> how do i do it
I'll trade you! This is how you do migrations. Change the declaration of
all of your applicable migrations:
class MyMigration < SecondaryDevelopmentMigration
... the remainder of your migration ...
# Put this somewhere convenient:
class SecondaryDevelopmentMigration < ActiveRecord::Migration
def self.connection
SecondaryDevelopment.connection
end
end
Your turn! How do you handle test fixtures for your second database?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---