This project is archived and is in readonly mode.

#6404 ✓resolved
fearless_fool

rake db:migrate:status fooled by backup files

Reported by fearless_fool | February 9th, 2011 @ 07:39 PM

The presence of backup migration files (e.g. 20110208231103_create_analysis_cdf.rb~) causes rake db:migrate:status to display spurious entries. Not a serious problem, but could lead to some confusion

$ cp db/migrate/20110208231103_create_analysis_cdf.rb db/migrate/20110208231103_create_analysis_cdf.rb~
$ rake db:migrate:status

(in /home/projects)

database: db/development.sqlite3

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20110125081331  Devise create users
   up     20110202020208  Create weather stations
  down    20110208231103  Create analysis cdf
  down    20110208231103  Create analysis cdf

Note that "Create analysis cdf" is repeated. It goes away when you delete the ~ file:

$ rm db/migrate/20110208231103_create_analysis_cdf.rb~
$ rake db:migrate:status

(in /home/projects)

database: db/development.sqlite3

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20110125081331  Devise create users
   up     20110202020208  Create weather stations
  down    20110208231103  Create analysis cdf

Versions, etc:

$ rake about
(in /home/projects)
About your application's environment
Ruby version              1.9.2 (x86_64-darwin10.6.0)
RubyGems version          1.3.7
Rack version              1.2
Rails version             3.0.3
Active Record version     3.0.1
Action Pack version       3.0.3
Active Resource version   3.0.3
Action Mailer version     3.0.3
Active Support version    3.0.3
Application root          /home/projects
Environment               development

Edited by Rohit Arondekar

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages