4 ms·
I'm the original author and current maintainer of DataMapper's migrations. I had a reply written up, but it ended up being really long, so I wrote a reply blog
by psadauskas 18y ago
I'm the original author and current maintainer of DataMapper's migrations. I had a reply written up, but it ended up being really long, so I wrote a reply blog post instead. I'm not trying to drive traffic to my blog, because I don't care, but here's a link: http://www.theamazingrando.com/blog/?p=86 http://www.theamazingrando.com/blog/?p=86
Essentially, DataMapper already provides the solution that Adam outlines in his post; Replace schema.yml with DataMapper model definitions, and have the discipline to not write data migrations. Write specs for your migrations, like everything else, and use DM migrations’ sane versioning, rather than AR’s irritating one, and you should be fine. There a definetly improvements to be made with DM migrations, to be sure, but I feel like I got the underlying design mostly right.
- jpcx01 18y agoThat's what I was thinking while I was reading the original post. Datamapper solves the problem awesome, provided you think the schema should be driven based on the generated model properties instead of magically defined in the schema and automatically mapped. Datamapper migrations are perfect since they focus on one time runnable data migrations, or a bulk schema per release, instead of having a huge chain of tiny schema tweaks that can go back and forward.