首页 文章

在rails中添加索引

提问于
浏览
-2

一世

我在运行rake db:migrate之后添加了has_many和belongs_to . 我添加了这些关联,然后再次使用db:migrate . 没有生成索引 . 你能告诉我为什么吗?

以下是我的协会

class Developer <ActiveRecord :: Base has_many:evaluations has_many:final_scores belongs_to:supervisor end

class Evaluation <ActiveRecord :: Base belongs_to:developer belongs_to:supervisor end

class FinalScore <ActiveRecord :: Base belongs_to:developer end

class Supervisor <ActiveRecord :: Base has_many:开发人员has_many:评估:through =>:开发人员结束

2 回答

相关问题