[Feature idea] Warn when model's primary key is set to non-indexed column(s)

16 views
Skip to first unread message

Yaw Boakye

unread,
Jun 7, 2017, 7:47:36 AM6/7/17
to Ruby on Rails: Core
This is not so much a feature as a way to let developers know that they may accidentally impact the application's performance negatively if they switch primary key to non-indexed columns. By default Rails creates an index for the primary key column (id). If the developer switches (via id: false) in migration or self.primary_key = column_name in model, it will be helpful to let them know that their current primary key isn't indexed.
Reply all
Reply to author
Forward
0 new messages