A
A
Alexander Sinitsyn2018-06-08 12:44:02
Yii
Alexander Sinitsyn, 2018-06-08 12:44:02

Do I need to delete indexes and foreign keys in the down migration before dropping the table?

Do I need to register all the drops, or are the indexes deleted automatically along with the table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-06-08
@a_u_sinitsin

You don't need indexes, but if you don't delete the foreign keys, it won't let you delete the table. So drop foreign keys first, then tables. (I'm talking about mysql, it may be different with others)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question