Do we need to keep a flow of migration files from development to production? [duplicate]

I was not pushing migration files to git and devops team making migration on their side when I do some changes in models. In development phase i played a lot with models added and removed some models made migrations and migrate. While doing these thing I deal with lot of migrarion issues. when I run python manage.py makemigrations appname it detect the new changes in models.py I hae also verified in migration files it is added but when i run python manage.py migrate it say tat no migrations to apply and in the end I need to delete the database and create databse again then do makemigrations and migrate. But I can't do this at production level. Below is one of the error im getting. This is the response while running migrate command. root@98d07ed814b3:/app# python manage.py migrate Operations to perform: Apply all migrations: admin, auth, communityEmpowerment, contenttypes, django_celery_beat, sessions, token_blacklist Running migrations: No migrations to apply. root@98d07ed814b3:/app#

I have tried faking migrations. delete migrations files and migrate it again but none of them worked. I want someone who can explain everything about django migrations and these common issues.

Вернуться на верх