From the original email back in August:

> In the fields block:
> - :index => true on a field will establish an index, with the Rails  
> default name
> - :index => 'foo' on a field will establish an index, named 'foo'
> - indexed fields which are marked unique will generate a unique index
>
> Outside of fields:
> - index :foo will create an index on :foo
> - index [:foo, :bar, :baz] will create an index on the three fields  
> together
> - pass :name => 'foo' to name the index
> - pass :unique => true to get a unique index
>
> Automatic indexing:
> - belongs_to will automatically add an index for their foreign key  
> (and type, if polymorphic); pass :index => false to turn off
> - STI bases should automatically add an index for the type field

These aren't done yet:
> - lifecycles will automatically add an index to the state field,  
> pass :index => false to the lifecycle block to turn off
> - should timestamps auto-add indexes? It can apparently help with  
> sorting...
> - should the attribute marked 'login' be indexed? It would certainly  
> make sense in user models.

--Matt Jones



On Oct 29, 2009, at 9:25 PM, kevinpfromnm wrote:
> so far so good.  is there a syntax guide for adding non-default
> indexes?  oh, I like the summary page too

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to