Django makemigrations adds a new file to migrations folder, however, migrate command doesn't do anything

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 migrate doesn't do anything.

(twisto-pU_5F16G-py3.10) ➜  twisto git:(burakhan-ze-204-trverification-serrvisine-gizlilik-politikasi-eklenmesi) python makemigrations customer
Migrations for 'customer':
    - Add field privacy_policy_doc_uuid to trupgraderequest
(twisto-pU_5F16G-py3.10) ➜  twisto git:(burakhan-ze-204-trverification-serrvisine-gizlilik-politikasi-eklenmesi) ✗ python 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.

can you try delete file in folder migartons like all , and do migrations again.

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.
Back to Top