On Tue, December 6, 2011 05:28, Rodrigo Rosenfeld Rosas wrote: > > Yes, I was referring exactly to PostgreSQL. Don't you > think that for most associations we would want an index? > > I'm proposing creating one unless specified not to. For > example: > > t.references :category, create_index: false > > Don't you think 'true' should be default for > :create_index? >
I would caution against adding such 'invisible' 'enhancements'. The more so given the wide variability of DBMS implementations. Better I think to leave everything having to do with foreign keys off by default and have the DBA specify case by case exactly which features should be turned on. Foreign keys are one of those things that prompt religious wars and I would rather have Rails avoid adopting one side or the other as dogma. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:byrn...@harte-lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.