Fearless Fool wrote:
[...]
> I've thought about how rake db:migrate works -- it modifies a database, 
> then asks the database to reveal its new structure to build a new 
> schema.rb.  Given that, it doesn't have enough information to know which 
> tables belong in the regular database and which belong in the external 
> database.  In short, db:migrate can only work on one database at a time. 
> (Am I right?)

Not to my knowledge.  I've never worked with multiple databases and 
Rails, but others have, and I don't know of an issue with migrations.

> 
> BUt your reply gave me an idea.  I could define a rake task that 
> essentially calls:
>    rake db:migrate
>    rake db:migrate RAILS_ENV=external
> thus always keeps a parallel structure between the two databases.  It's 
> a little clunky, because I would only be using one of the tables in the 
> external database, but that shouldn't really matter.

That seems like a terrible idea.  It would put a lot of unnecessary crap 
in both databases.

> 
> Does this make sense?  How would you approach this?
> 
> Best,
> 
> - ff

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to