views:

240

answers:

2

Is there any trivial way to copy the data from developmenet database into the test one? I know theres a way to copy schema and recreate database, but is there any rake task to populate test database with development one?

+2  A: 

You can use:

rake db:test:clone

To copy the development db into test.

Toby Hede
Doesn't work for me at all. Structure is created, but no records are copied. Is that task ment to copy the data at all? The description isn't pointing that directly.
mdrozdziel
+1  A: 

You can use mysql directly:

mysqldump app_development | mysql app_test
ndp