I asked on another thread about adding an "organisation_id" across the
whole database to effectively give a separate database for different
organisations who use the app.

The other way of doing it would be to have one app but different
databases depending on the subdomain (or some logon credential).

I'm not really sure how to do this.. probably something like:
ActiveRecord::Base.establish_connection(
           :adapter  => mysql,
           :host     => localhost,
           :username => xyz,
           :password => password,
           :database => "Different for each subdomain"
         )

in the application.rb but I'm a bit unsure of the details.

Not sure if there would be a lot of extra grief running migrations etc
with multiple databases...

Any ideas of pros and cons and recommended solutions welcome.

The app is mysql running on apache /passenger.

Cheers
George

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

Reply via email to