tag:blogger.com,1999:blog-12467669.post6983160129561153371..comments2023-04-29T07:23:25.825-04:00Comments on Jay Fields' Thoughts: Rails: Use Ruby Schema syntax without using MigrationsJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-12467669.post-67823856831983376692007-04-10T16:13:00.000-04:002007-04-10T16:13:00.000-04:00We have a pretty big development team so we run in...We have a pretty big development team so we run into a problem of having too many migrations pretty soon. What we now is as soon the release goes to production, we run all migrations up the the version in production, dump the DBs into SQL and then consolidate all already run migrations into a single one which <A HREF="http://revolutiononrails.blogspot.com/2007/02/data-loaders-in-migrations.html" REL="nofollow">simply loads the generated SQL.</A>Val Aleksenkohttps://www.blogger.com/profile/16003734095276403879noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-49151217682941133002007-04-10T15:54:00.000-04:002007-04-10T15:54:00.000-04:00I'm sort of thinking that Migrations are being abu...I'm sort of thinking that Migrations are being abused a little in the way that they're proposed as being used.<BR/><BR/>The way that it seems that the DHH advocates using them is that any time you make a change during development, in goes a new migration and then you go all db:migrate.<BR/><BR/>You've of course pointed out the problems before with this. It *seems* to me that migrations really want to be release tools, for managing the changes to the production database, probably with a separate set of tests for up and down movements to ensure that data stays valid from version to version.<BR/><BR/>Within development, I'd think that, like you've mentioned, all the changes oughta go into one file, and you run a rake task to update your repo and drop and reload your databases for development and test.<BR/><BR/>Maybe then a migration task could be added that automagically generates the migrations between two version tags? (Too complicated maybe?) And then you write tests for migrational data validity and add in any code needed to make those tests pass.<BR/><BR/>If I was smart enough and had time, that's what I'd try for.Dan Nugenthttps://www.blogger.com/profile/17024579990613770367noreply@blogger.com