【发布时间】:2012-01-28 22:55:01
【问题描述】:
我正在使用 Rails 和 postgres。
我有几个使用 STI 的模型,我想知道应该将索引放在表的什么位置,为什么?
例如,假设我有以下设置:
class Comment < AR; end
class MovieComment < Comment; end
class MagazineComment < Comment; end
# Fake Comment Table
id:integer
title:string
body:text
type:string
谢谢!
【问题讨论】:
标签: ruby-on-rails database postgresql single-table-inheritance sti