How are indexes managed in migrations

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 Biedenharn