Massive data insert during migration

Will Gant wrote:

Hello all,
I've got a site that will be used by people (hopefully) all over the world. One of the requirements of registration is country and province of residence. I have a list of all the countries in the world and all their subnational entities. Currently, the two lists are divided between a pair of comma-delimited text files. If this were something less dynamic and cool, I'd probably import it into Excel or some equivalent and then do some find-and-replace voodoo to create the SQL statements to enter it into the database. What would you do if you were doing this in rails and wanted to make sure this data was inserted when you run a migrate task?


You could convert it to YAML and then import it with your migration using the 'migration data dumper'

I wrote a post in this last month:

The plugin: