Is there a rake task to extract data from a database/table

I know I can get the schema by running

rake db_schema_dump

but, is there a way to ge the data from a table or a database into a
format
that can be quickly converted to a migration. What I’m really trying to
do
is synch my local development database (schema and data) with the db on
my
hosting service.

Larry K. wrote:

I know I can get the schema by running

rake db_schema_dump

but, is there a way to ge the data from a table or a database into a
format
that can be quickly converted to a migration. What I’m really trying to
do
is synch my local development database (schema and data) with the db on
my
hosting service.

I’d recomend running the same database on your development machine as
that on your production server and use the native datbase dump/restore
methods. You can then wrap them with rake commands if you want.

Examples of what you need to do can bee seen in the code for the default
rake tasks that synch test to development.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs