Ruby on Rails使用SQLite3时,如何解决迁移过程中出现的重复列名SQLException问题?

更新于
2026-10-09 05:30:30
0阅读来源:SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计124个文字,预计阅读时间需要1分钟。

Ruby on Rails使用SQLite3时,如何解决迁移过程中出现的重复列名SQLException问题?

我目前关注于Ruby on Rails教程,具体教程内容可查看:https://www.railstutorial.org/book/updating_and_deleting_users

我目前正在关注 Ruby on Rails教程,我在 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问题?

本文共计124个文字,预计阅读时间需要1分钟。

Ruby on Rails使用SQLite3时,如何解决迁移过程中出现的重复列名SQLException问题?

我目前关注于Ruby on Rails教程,具体教程内容可查看:https://www.railstutorial.org/book/updating_and_deleting_users

我目前正在关注 Ruby on Rails教程,我在 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问题?