Google Groups Home
Help | Sign in
Message from discussion Migrations and SVN branches (comments requested)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Courtenay  
View profile
 More options Dec 8 2006, 8:04 am
From: Courtenay <court3...@gmail.com>
Date: Fri, 8 Dec 2006 05:04:54 -0800
Local: Fri, Dec 8 2006 8:04 am
Subject: Re: Re: Migrations and SVN branches (comments requested)
On 12/8/06, court3...@gmail.com <court3...@gmail.com> wrote:
> self-reply here, pre-empting questions..

> Courtenay wrote:
> > > >>>> Is this something that would be a useful addition to Rails core?
> > > >>>> I'd appreciate some feedback / criticism.

> > > >>> Wow, this looks really complicated. I think the solution with all

> > Why can't we just have a ParallelMigration (IndependentMigration)
> > subclass that doesn't check for duplicates in the numbering?

> > My most common use case is where I'm taking someone else's app,
> > checking it in locally with svk, adding some fields or models here and
> > there, but my changes are really in parallel with the original
> > changes.

> > In that case I'd have

> > 067_create_monkey_table
> > 068_add_banana_field_to_monkey.rb
> > 068_add_product_table.rb
> > 069_add_monkey_field_to_product

> > We would assume from looking at the numbering that both 068_* are
> > somewhat dependent on 067, and come before 069.  It would work only if
> > they are both this new independent migration class.

> > This opens up a whole new metaphor for thinking about migrations;
> > independent migration classes. So you'd add a few tables all at once,
> > but instead of putting then sequentially or in the same file, you make
> > 3 parallel files.

> > I don't know if this solves the "long-running" branches issue, but
> > it's certainly simple..

> I spend a lot of time doing branch-based development, where you make a
> branch for each major feature.  It's powerful, but merging migrations
> is horrible.

> What happens if you migrate up or down and you never applied one of the
> parallel patches? or, if you merge someone's code and it contains old
> migrations that you've progressed over?
> For example, you're at version=52 but someone else's merged code adds
> 47 and 51, which you haven't run..   In this case you just migrate down
> and up again..

> What if you only applied one of the migrations 068, but you want to go
> down anyway?  I guess the IndependentMigration would have to specify if
> you can skip it..otherwise, do what we all do when migrations half-run,
> go in, comment out the offending code, migrate down, and uncomment it
> again.

Damn, how'd it get to be 5am?

http://blog.caboo.se/articles/2006/12/08/simultaneous-migrations
http://dev.rubyonrails.org/ticket/6799

Here's the patch :)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google