A
A
astatium1352019-12-23 16:32:28
Django
astatium135, 2019-12-23 16:32:28

Why doesn't Django "pick up" all applications when migrating?

The following problem has surfaced: when receiving the makemigrations command, Django ignores some of the applications. At the same time, if you call the creation of migrations for this application directly (python makemigrations menu, for example), then the migration will be created. Also, when trying to use dzhang unit tests, for some reason, first of all, models of those applications are added to the test database for which migrations did not want to be created, with a final crash on integrity error.
Prompt, please, why it can occur, and how it to treat.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
astatium135, 2019-12-23
@astatium135

Problem solved. If someone was brought here by Google - check that your application folder has a migrations folder, and there is an empty __init__.py file in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question