el n00b el n00b - 25 days ago 10
Ruby Question

Ruby second_base dump schema

I am using Ruby on Rails and have the second_base Gem in use to connect to a second data source. Everything works fine for

db:schema:dump
commands and everything else; however, I don't see a way to dump the schema from second_base.

When I attempt to run
bin/rake db:second_base:schema:dump
I get the following message:


rake aborted!

Don't know how to build task 'db:second_base:schema:dump' (see --tasks)

(See full trace by running task with --trace)


When I use the documented
db:second_base:schema:cache:dump
it does not give me the data I am expecting.

Maybe I'm missing it on the GitHub page, but how would I go about generating a schema.rb file for second_base?

Answer Source

From second_base documentation:

Below is a complete list of :db tasks that automatically run a mirrored
:db:second_base task. Some private or over lapping tasks, like schema 
dump/loading or db:setup, are not listed.

So there is no rake task for schema:dump for second_base.