Django: Migrations Not Applied or Conflicts
DB.
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.
Step 1: Back up the database

Copy the database file or run a dump before running any migration.
Step 2: Check the status

Run python manage.py showmigrations. Boxes marked [X] are applied and [ ] are pending.
Step 3: Create and apply

Run python manage.py makemigrations and then python manage.py migrate.
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

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

Do not change or delete migration files that already ran in production. Add a new migration instead.
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
- Writing Clear Error Reports: Screenshots, URLs and Steps
- WordPress Tag and Date Archives Duplicate Content: Settings
- WordPress Permalinks Change: Redirect Old URLs and Avoid 404s
- Error Establishing a Database Connection in WordPress: Full Checklist