0
votes

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?

2
To further clarify, the output from the rake db:migrate shown in Agile Web Development with Rails, Third Edition does include the version number: == 20080601000001 CreateProducts: migrating ======================== -- create_table(:products) -> 0.0027s == 20080601000001 CreateProducts: migrated (0.0028s) =============== I'm just trying to figure out if the output from the command has changed or if there's some other problem. - Bruce Hobbs

2 Answers

4
votes

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
1
votes

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