I just added a new field to a database model in my django app. When I run makemigrations, I see that a new migration file is created, however, running python manage.py migrate
doesn't do anything.
(twisto-pU_5F16G-py3.10) ➜ twisto git:(burakhan-ze-204-trverification-serrvisine-gizlilik-politikasi-eklenmesi) python manage.py makemigrations customer
Migrations for 'customer':
apps/customer/migrations/0221_trupgraderequest_privacy_policy_doc_uuid.py
- Add field privacy_policy_doc_uuid to trupgraderequest
(twisto-pU_5F16G-py3.10) ➜ twisto git:(burakhan-ze-204-trverification-serrvisine-gizlilik-politikasi-eklenmesi) ✗ python manage.py migrate
Operations to perform:
Apply all migrations: abtest, account, accounting, admin, api, auth, banking, campaign, card, career, cash, change_requests, collectora, contenttypes, customer, dealerpanel, documents, feedback, gdpr, heureka, homepage, kyc, land, partner, postdeploy, product_category, psp, request, risk, saltedge, scoring, sessions, shopping, spi, support, treehorn
Running migrations:
No migrations to apply.
CodePudding user response:
can you try delete file in folder migartons like 0001_.py all , and do migrations again.
CodePudding user response:
Check table django_migrations
.
If you have file in "migrations" folder and migrate does not do anything, that means one of two reasons:
- migration is already in database;
- you have deleted previous migration file with same number, so Django ignores it.