How to dump DB datas -> rails statements?

Hello, it’s easy to dump a schema to Activerecord code (rake
db:schema:dump) but how do I dump datas ?

My need is to create a new migration that will also populate the table
created. The datas are actually in a legacy mysql table.

Should I dump the table to yaml then import yaml at after the table
creation in the migration file ?

Any hint appreciated, thank you !

http://www.rubyinside.com/advent2006/13-preload.html

askegg wrote:

Preloading Large Data Sets Using 'rake migrate'

Fine ! Thanks a lot