I have walking on a strange way, but it is result of circumstances.
I had to been generate single models.py from exist postgres DB by inspect_db.
Next I fix some field (was a few problem with keys), and create 2 apps inside this project. So now I have 3 models.py (them are split models.py, whitch was generate by inspect_db). managed = True
was added. Classes have same links and datatypes like in the database
Next I wish to integrate this models to exist database. I make migration, I migrate and in the end DB have only system django tables (auth_, django_migrations etc.) None from my classes (although migrate files were create). So I tryied to delete migrations catalogs and repeat makemigrations
and migrate
, but terminal threw it:
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
No migrations to apply.
(forest-venv) user@user-HP-Z800-Workstation ~/MyProjects/forest-venv/lesoved $ python manage.py runserver 8001
Performing system checks...
If I try make migrates again - no changes. I tryied to delete info about my apps in django_migrations table - no result.
So my questions: - It is possible to integrate new models into exist database (if names, keyes and formats is ok)? - Integration is possible by the way where data from exist database is saved after migrations? - How to return possobillity of make migrations? now it isn't work.