ruby-on-rails – SQLite3 :: SQLException:迁移时重复的列名

我目前正在关注Ruby on Rails教程,我在https://www.railstutorial.org/book/updating_and_deleting_users#sec-administrative_users每次运行bundle exec rake db:migrate我都会收到以下错误:

SQLite3::SQLException: duplicate column name: remember_digest: ALTER TABLE "users" ADD   "remember_digest" varchar/home/mclacs14/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/sqlite3-1.3.9/lib/sqlite3/database.rb:91:in `initialize'
最佳答案
尝试将数据库迁移到version = 0
with命令:rake db:migrate VERSION = 0

然后跑
rake db:migrate

转载注明原文:ruby-on-rails – SQLite3 :: SQLException:迁移时重复的列名 - 代码日志