Colin Law wrote:
> Am I misunderstanding your question, or is it just a matter of doing
> rake db_migrate RAILS_ENV=external
> to migrate that db?
> Colin

Colin: your answer was *perfect* for the question I asked. 
Unfortunately, I'd over-simplified the question.

I have *two* databases: the 'external' one holds static data -- it never 
changes as a result of my application.  The 'regular' database 
(dbtest_development, dbtest_test, or dbtest_production) holds data that 
does change as a result of running the application.

I need to split my data between the external and the regular databasen.

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?)

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.

Does this make sense?  How would you approach this?

Best,

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