Hi all, I have to change my database structure for a new release. I can change the database structure with migrations but I also want to move the data from the old structure to the new structure. Is this best done via a migration (if possible)? Thanks Stijn
on 2008-12-17 12:00
on 2008-12-17 16:19
A migration is probably the best way to approach this; you'll be moving your data programmatically as well as creating the new structure. If possible, your 'down' method could put it all back the way it was as well. I did this recently, and following the create for the new tables, there were a series of data steps within the migration to move data from the old structure to the new. I cloned my live data to my dev envt to make sure I handled all the existing cases. Then test, test, test.