This project is archived and is in readonly mode.

#631 ✓invalid

Move Migration UTC Timestamps Inside File

Reported by nikz | July 16th, 2008 @ 12:51 PM | in 2.x

This is a patch-in-progress to move the UTC timestamps into migration files, rather than having them as part of the filename.

It was discussed on the core list

This patch does a couple of things:

  • Changes back to numbering for migration files
  • Adds a timestamp to generated migration files inside the class (self.timestamp = generation_time.to_s
  • Adds the rake:migrations:renumber tasks, which automatically renumbers migrations based on their UTC timestamp

The renumber task is run automatically if the migrate task finds duplicate migrations.

It's also "svn-aware" for its move command, as svn is the only VCS (in my limited experience) which has problems with files moving.

I know there are no tests; and in fact some fail! I'm working on that, just thought I'd post it so I can get feedback.



Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket