On Jun 18, 2008, at 3:24 PM, Ben Johnson wrote:> This is something I have not fully understood. So I figured I would
> ask
> a quick question.
>
> If I have an index on a column in a table and I rename that column
> does
> the index reflect the new name? Also what if I remove a column? Is the
> index removed?
>
> Sorry for such a noob question, figured it was easier to ask on here.
This is really a question about your database and its behavior, but I
suspect that both things are true. Changing a column name means that
the index still refers to that column with its new name (but the name
of the index itself which may have been based on the original column
name has almost certainly not changed) and removing a column causes
any and all indexes that include that column are similarly removed.
In all cases, the best way to get the answer is to actually try it and
see what happens.
-Rob
Rob Biedenharn http://agileconsultingllc.com
Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---