r_31415
r_31415

Reputation: 8980

Indexes in Django after running syncdb

Is it there a way to know the current status of mySQL tables in Django after creation through syncdb or do I need to use dbshell?

Another quick question: Suppose I add an index manually after running syncdb, do I have to add index_db to the corresponding field in the model?

Regards

Upvotes: 0

Views: 488

Answers (1)

second
second

Reputation: 28665

you don't have to. index_db only tells django to add an index when creating the table. adding it subsequently has no effect (though you may want to add it anyway to indicate the presence of and index). if you are using south (you should be) then adding index_db will add index creation to your next migration.

Upvotes: 2

Related Questions