Running rake db:schema:dump with a different schema

158 views
Skip to first unread message

Don McClean

unread,
Dec 17, 2012, 7:31:59 PM12/17/12
to oracle-...@googlegroups.com
I have an oracle account which is granted access to a legacy oracle schema. I would like to
run rake db:schema:dump from my account so I could dump the legacy schema and generate a test database. Is there
a way to do this? I don't see a way.

Thanks,
Don

Greg Clarke

unread,
Dec 18, 2012, 10:37:17 PM12/18/12
to oracle-...@googlegroups.com
Hi Don

You could create a new rails app with oracle as the database option, set the appropriate user in the database.yml, test the connection, then run that rake command. The schema file is all you want, so grab the schema file and toss the rails app away. Have you tried something like that?

Regards

Greg

Greg Clarke

unread,
Dec 18, 2012, 10:52:30 PM12/18/12
to oracle-...@googlegroups.com
Don

Sorry, missed the bit of your question about generating a test database.

After you get the schema dumped, keep using the temporary rails app, set up the credentials for a test database in the database.yml, then run

RAILS_ENV=test  rake db:schema:load  


Hope this helps.


Greg

Don McClean

unread,
Dec 19, 2012, 10:54:42 AM12/19/12
to oracle-...@googlegroups.com
HI Greg,
  Thanks for the reply. I will try that.

Don
Reply all
Reply to author
Forward
0 new messages