SQLite3::SQLException: duplicate column name while migrating

回眸只為那壹抹淺笑 提交于 2020-01-22 16:11:33

问题


I am currently following the Ruby on Rails Tutorial and I am at https://www.railstutorial.org/book/updating_and_deleting_users#sec-administrative_users Every time I run bundle exec rake db:migrate I get the following error:

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'

回答1:


try migrating your DB to version=0 with command: rake db:migrate VERSION=0

and then run rake db:migrate



来源:https://stackoverflow.com/questions/27830727/sqlite3sqlexception-duplicate-column-name-while-migrating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!