-1

i've finished developing a django project and wanted to change sqlite3 to MySql for a better database option. I tried in an empty project to change database, it worked like a charm. But now i changed db of my project and when i try to do python manage.py makemigrations it returns;

django.db.utils.ProgrammingError: (1146, "Table 'tvekstra-django-tracker.tvchannels_channels' doesn't exist")

Any help is appreciated, thanks.

1 Answers1

0

I guess you have code that is trying to query the database before makemigrations runs. Here is a similar question. To help with your specific problem, you need to show the full traceback which will show where the query is occuring, and your views.py.

Safwan Samsudeen
  • 1,645
  • 1
  • 10
  • 25
  • Turns out in views.py i've been listing channels while there are no tables, i deleted it and migrated it worked fine. Thanks for the views.py tip! –  Nov 03 '20 at 09:00
  • Comment out all the places which make a query(`model.objects.all()` or `model.objects.create()` or `model.objects.something`). – Safwan Samsudeen Nov 03 '20 at 09:01