Never mind, I’m an idiot. Rails automatically gives objects a primary
It won’t automatically create an index on it, though, so you might
The primary key (in mysql at least, but i’d doubt it be otherwise in
other dbms) is automatically indexed, that’s part of being a primary
key. No need to put an index on it.
Peter De Berdt
PostgreSQL and SQL Server (unless it’s changed recently) automatically
index primary keys, but not foreign keys. In the PostgreSQL docs, I’m
pretty sure it says that a primary key is enforced via a unique index.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.