Guides › HTML / PHP sites › Site down or error screens

Django: Migrations Not Applied or Conflicts

DB.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Site down or error page

Django errors such as no such table, no such column or Conflicting migrations mean the database does not match your models. Back up first, then bring the two back in line.

1Back up the database2Check the status3Create and apply4Resolve conflicts5Check the target database6Never edit applied migrations7Migrate on every deployFixed? Test the site. If not, get help.
The steps in order. Work down the list and stop when the problem is solved.

Step 1: Back up the database

Illustration for Step 1: Back up the database

Copy the database file or run a dump before running any migration.

Step 2: Check the status

Illustration for Step 2: Check the status

Run python manage.py showmigrations. Boxes marked [X] are applied and [ ] are pending.

Step 3: Create and apply

Illustration for Step 3: Create and apply

Run python manage.py makemigrations and then python manage.py migrate.

Step 4: Resolve conflicts

Illustration for Step 4: Resolve conflicts

If two branches created migrations, Django reports Conflicting migrations. Run python manage.py makemigrations --merge and commit the merge file.

Step 5: Check the target database

Illustration for Step 5: Check the target database

A missing table often means you migrated a different database than the one in use. Check DATABASES in the settings the server loads.

Step 6: Never edit applied migrations

Illustration for Step 6: Never edit applied migrations

Do not change or delete migration files that already ran in production. Add a new migration instead.

Step 7: Migrate on every deploy

Illustration for Step 7: Migrate on every deploy

Run migrate before restarting the app after each release.

Still stuck?

If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-22.