On 23/09/2007, at 2:20 AM, DHH wrote:

>> Posted here as it's a somewhat opinionated patch.
>
> This doesn't match my usage pattern. Usually my migrations that just
> go up are about fixing data or something else, like populating a
> counter cache. I still want to be able to go 3 versions back, but if
> there's an irreversible mixed in there it'll halt.

Yeah I actually have your workflow too. I'm not talking about  
changing behaviour and removing the self.down from the default  
template, just improving the use case of creating an  
IrreversibleMigration.

I guess really there's 3 categories of migrations:

(1) Up + down, reversible
(2) Up only, reversible
(3) Up only, irreversible

At the moment things are set up so (1) and (2) are easy peasy (from  
the generator template), but (3) is harder than it should be. Why not  
just remove self.down?

At the moment (3) requires looking up the (currently incorrect) API  
instructions and writing a message why you're raising.

As an aside: it seems odd/useless to me that the  
IrreversibleMigration class is defined and then only referenced in  
the documentation.... it's not actually handled anywhere. You could  
raise any old error.

-- tim


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to