Answer the question
In order to leave comments, you need to log in
Why are models not being added to postgresql from django?
Good day, there is postgresql, there are models, about 7, created initially and, therefore, displayed in the database.
When you try to add models, register makemigrations and migrate, no errors come out
. The migrations/0001_initial file itself ... Contains seemingly correct data, that is, the added models are there.
But they are not saved in the database, and the database, in principle, does not see migrations, except for the first ones, that is, it is impossible to delete data or add data.
What could be the reason?
Answer the question
In order to leave comments, you need to log in
And so I delete old migrations, make new ones, makemigrations, and apply migrate
migrate <app_label> <migration_name>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question