SQLite3::SQLException:迁移时重复的列名
SQLite3::SQLException: duplicate column name while migrating
我目前正在关注 Rails 教程中的 Ruby 并且我在 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'
尝试将您的数据库迁移到版本=0
使用命令:rake db:migrate VERSION=0
然后是运行
rake db:migrate
我目前正在关注 Rails 教程中的 Ruby 并且我在 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'
尝试将您的数据库迁移到版本=0
使用命令:rake db:migrate VERSION=0
然后是运行
rake db:migrate