We mix data and sql statements in migrations all the time at Basecamp. This is what migrations were designed to do! They’re intended to be moments in time. Not to be replayable forever. The stable unit is schema.rb (or structure.sql).
DHH
(DHH)
10
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Approaches to data migration on Rails applications | 14 | 2013 | September 27, 2024 | |
| Migrations Shortcomings | 11 | 158 | October 15, 2006 | |
| how to share variables in data migrations (up/down) | 26 | 348 | March 5, 2010 | |
| Rake tasks for development and testing | 23 | 1347 | December 8, 2007 | |
| In the need for separating data migration from schema migration | 6 | 786 | April 15, 2015 |