小编Ken*_*lis的帖子

Rails:如何删除挂起的迁移

我目前正在关注ruby on rails教程:http://guides.rubyonrails.org/getting_started.html.

我正在尝试将数据保存到数据库中.但是,当我运行时:rails server我收到以下错误:

Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development
Run Code Online (Sandbox Code Playgroud)

我查看了其他文章,当我跑步时:

bin/rake db:migrate 
Run Code Online (Sandbox Code Playgroud)

我得到了 rake aborted!

运行后:

rake db:abort_if_pending_migrations....
Run Code Online (Sandbox Code Playgroud)

我看到:

You have 1 pending migration:
20150805200129 CreateDatabases

SQLite3::SQLException: table "databases" already exists:
Run Code Online (Sandbox Code Playgroud)

它只是告诉我运行rake db:migrate再次启动.

它似乎已经存在.有没有办法取消挂起的迁移?

ruby migration ruby-on-rails

20
推荐指数
2
解决办法
2万
查看次数

标签 统计

migration ×1

ruby ×1

ruby-on-rails ×1