views:

83

answers:

1

I would like to create a migration to add test data to other developer's environments using the data that I have manually added to my own test environment over the past month or so. Is there a good plugin or gem to do this quickly? I started trying to create one manually yesterday and wanted to claw my eyes out after about 10 minutes, so I am hoping there is a more convenient way.

Thanks!

Tom

+2  A: 

A migration should not be used to feed the database. If you need to generate data for the tests or development, you can use the fixtures or create a specific rake task to feed the database.

Simone Carletti
Ah ok, that makes sense. I'm new to rails and haven't really played around with fixtures yet (frankly, I didn't even know what they were). :) So I just generate fixture files and then run say rake db:fixtures:load to load them all into the db?
cakeforcerberus
Yes, that's the way fixtures work.
Simone Carletti