On Nov 3, 9:46 pm, Geekforaday-Learnerforlifetime
<coolest.g...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I want to add a migration to create an index using btree , googled a
> little but couldn''t find anything thats relevant.
>
> is this possible in rails ? or is there a work around ?
>
> appreciate your help , thanks
>
> -CG
I think btree is a fairly common default. For instance it''s the
default in postgres, right?
So if you just used the rails ''add_index'' you''d get a
btree index.
It looks like add_index doesn''t pass on extra options though (there
might be some
method that does this in rails I just don''t know it). So if you needed
to
specify the index method, you might have to execute the sql manually
in your migration.
YourARClass.connection.execute(''CREATE INDEX ... USING
btree...'')
You''ll have to consult your db docs to establish its capabilities and
sql to use.
--
Daniel Bush
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---