Friday, December 07, 2007

Migrations chapter in AWD


The book shows an example of how to use data only migrations. The problem with this approach is that you have to write code for every table you want to populate. A better way to do it is to use the Rick Olsen's rake task found in the Beast source code.

This allows you to add data to any number of tables using just one task. It basically loads the data using fixtures. The fixture files are created under bootstrap folder in fixtures directory.

I still don't get it when the book has an example of irreversible migration and just raises the exception. What if I just want to continue migrating downwards without stopping at the irreversible migration?

No comments:

Post a Comment