OperationalError, no such column. Django

后端 未结 22 1879
情话喂你
情话喂你 2020-12-24 00:45

I am very new to django and was able to finish the tutorial on djangoproject.com without any errors. I am now going through the Django REST framework tutorial found at http:

22条回答
  •  误落风尘
    2020-12-24 01:38

    The most direct way of solving this type of problem is just the following 3 steps process:

    1. Delete all the migration related files from app's migrations folder/directory (these basically starts with 0001, 0002, 0003 etc).

    2. Delete/Rename the existing database file named db.sqlite3 from App directory.

    3. Now run the following command:

      python manage.py migrate

      Finally execute

      python manage.py createsuperuser

      to perform the administrative tasks (If you want).

提交回复
热议问题