weixin_39782500 2020-11-22 01:58
浏览 0

Indexes are not created for STI child columns during automigration

See attached script. :index => true doesn't appear to have any effect for automigrations of STI subclasses.

Created by Greg Campbell - 2009-02-03 23:28:52 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/795

该提问来源于开源项目:datamapper/dm-core

  • 写回答

6条回答 默认 最新

  • weixin_39782500 2020-11-22 01:58
    关注

    I can confirm this is a bug.

    One thing to keep in mind is that while indexes should be used in subclasses, unique indexes should not be. If a unique index is created for a property that only exists in a subclass then it would become impossible to save the superclass or any siblings.

    by Dan Kubb (dkubb)

    评论

报告相同问题?