It's not explicitly mentioned in the documentation (http://dev.mysql.com/doc/refman/6.0/en/drop-table.html). I ask because I just saw a curious database migration in a Rails project where the developer was removing all the indexes before dropping the table, and that seemed unnecessary.
Asked
Active
Viewed 2.2k times
3 Answers
56
Yes, it does.
However, if you have foreign key constraints such as RESTRICT that ensure referential integrity with other tables, you'll want to drop those keys prior to dropping or truncating a table.

AvatarKava
- 15,245
- 2
- 27
- 33
5
Yes it would drop the index. There's no reason to keep the index if the underlying table isn't there. I suspect that the downward migration is just doing the opposite of the upward migration on a one-to-one basis.

Undo
- 25,519
- 37
- 106
- 129

tvanfosson
- 524,688
- 99
- 697
- 795
1
It is unneccessary. Your DROP TABLE might however be prevented when the table is part of foreign key relationships and dropping your table would break the dependencies.

Daniel Schneller
- 13,728
- 5
- 43
- 72