views:

177

answers:

2

rake 0.8.7, rails/activerecord 2.3.3

Output from rake db:migrate:

== CreateProducts: migrating ================================================= -- create_table(:products) -> 0.0017s == CreateProducts: migrated (0.0019s) ========================================

Shouldn't the version number, in this case 20090724013528, appear before the migration name?

+1  A: 

I can't remember 100% but I think they removed the number in that output when they switch migrations over to the UTC timestamps.

You can however check the current version of your DB using:

rake db:version
paulthenerd
Based on the output shown in the book I mentioned in the updated question, the version number was included at some point. Looking at the code for the announce method that generates the output it seems like the @version variable contains a blank rather than the version number.
Bruce Hobbs
A: 

As pointed out by paulsnotes, the timestamp represents the version number. If you really want to switch back to sequential numbers, you can set a flag in environment.rb.

config.active_record.timestamped_migrations = false
Tate Johnson
Thanks, but I don't want to switch back to sequential numbers.
Bruce Hobbs