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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Yaw Boakye
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.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Loading...