Django - No such table: main.auth_user__old

Just did this and it resolved the problem:

pip install Django --upgrade

Then:

python manage.py migrate

python manage.py makemigrations app

python manage.py migrate

Get rid of this issue easily maintaining the following steps:

  1. keep django version 2.1.5 (the issue addressed in this version) pip install django==2.1.5
  2. Delete the SQLite db
  3. Migrate again python manage.py makemigrations and then python manage.py migrate
  4. Start the server python manage.py runserver

DONE!


Here is what I did to solve this problem:

  1. Go to the virtual environment and install [email protected]

    pip install django==2.1.7
    
  2. Delete the db.sqlite3 file in your root folder.

  3. Create the new db.sqlite3 in your root folder.
  4. Re-run migrations:

    python3 manage.py makemigrations
    
    python3 manage.py migrate
    

Now it should be working all right.


I just came across this myself, it looks to be related to https://code.djangoproject.com/ticket/29182. For now, you can just downgrade your version of sqlite to a version prior to 2.6 (e.g. 2.5.1)