Go to Google Groups Home    Ruby on Rails: Core
Re: [Rails-core] timestamped migrations

Michael Koziarski <mich...@koziarski.com>

> Pratik suggested I send an email to this list to discuss making timestamped
> migrations optional.  I have submitted a ticket which includes a patch.  I
> am a bit confused why the ticket was marked as incomplete as the solution
> seems rather simple.  IMHO, making this optional would have saved the effort
> of removing code.

It's marked incomplete because you've got the defaults backwards.  UTC
migrations should be the default:

+    # Specify whether or not to use timestamps for migration numbers
+    cattr_accessor :timestamped_migrations , :instance_writer => false
+    @@timestamped_migrations = false

> There are other minor issues, but don't think there's a need to get that
> picky, this should be example enough.

I like the idea of the configuration option, just flip the default and
get some feedback from other potential users to make sure it makes
sense to them.

> In the future, should I submit a ticket first or just post something to this
> list?

Generally a ticket is fine if it's a bug fix or something 'obvious'.
But if you want to add an option or get some ideas about a new API or
have a change in mind that might be controvercial, then this list
should be your first port of call.

> Thanks for all the work, Rails saved me from the Java world. :)

> I hope timestamped migrations are made optional in the next release of
> Rails, but if not, I have a way around it.  I'm writing this for other Rails
> users more than myself.
> -andy

> --
> Andrew Stone

--
Cheers

Koz