我刚刚使用以下命令将我的表Client重命名为Person :
class RenameClientsToPeople < ActiveRecord::Migration
def change
rename_table :clients, :people
end
end
我小心地将所有实例和文件名从client重命名为person以及从clients重命名为people。但由于某种原因,我的应用程序将不再工作。我经常收到这样的错误:
SQLite3::SQLException: no such column: projects.person_id: SELECT COUNT(*) FROM "projects" INNER JOIN "people" ON "projects"."person_id" = "people"."person_id" WHERE "people"."user_id" = 1
谁能告诉我如何解决这个问题?
也许我应该从头开始重新创建 Person 模型,而不是仅仅重命名它?