rake db:migrate:up version error

时间:2013-08-07 09:11:29

标签: ruby-on-rails ruby-on-rails-3

我创建了一个带整数,字符串退款的模型 当我尝试迁移这个新表时,我遇到了错误。

rake db:migrate:up VERSION=20130806144409



rake aborted!
No migration with version number 20130806144409
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.13/lib/active_record/migration.rb:677:in `run'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.13/lib/active_record/migration.rb:578:in `run'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:230:in `block (3 levels) in <top (required)>'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `eval'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:migrate:up

我的迁移文件名20130806144409_create_refunds.rb

这是其中的内容

class CreateRefunds < ActiveRecord::Migration
  def change
    create_table :refunds do |t|
      t.integer :job_id
      t.integer :customer_id
      t.integer :amount

      t.timestamps
    end
  end
end

0 个答案:

没有答案