django.db.utils.Ope...
 
Notifications
Clear all

django.db.utils.OperationalError: no such table: blogs_category

3 Posts
2 Users
0 Reactions
23 Views
0
Topic starter

Reference Section-20:

Add post assign logged in user to author

Sir, I faced an issue during this lecture, But Now in this time, I tried to debug it by taking help from stack overflow. As per Stack overflow, I deleted my database" db.sqlite3 and ran commands makemigrations and migrate. Now after this, I am facing the above mentioned issue. kindly help in this regard.

This topic was modified 2 weeks ago 2 times by Ejaz Ali Inayat
2 Answers
0

HI Ejaz Ali Inayat  ,

The issue you are facing is because there are no migrations to apply. I also encountered the same issue with your code previously.

To resolve this, first, run:

python manage.py makemigrations

If the issue persists, try making a small change in the model. For example, in my case, I changed category_name from max_length=50 to max_length=51, then ran the migrations again, and it was fixed.

Follow the same steps for all models, and hopefully, your issue will be resolved.

If you still face any issues, let me know.

Ejaz Ali Inayat Ejaz Ali Inayat Topic starter 10/02/2025 11:18 pm

@mohaiminul-islam Sir, the issue remains the same as django.db.utils.OperationalError: no such table: blogs_category

0

 Ejaz Ali Inayat, 
If you're still facing the issue, it might be because your migrations haven't been created. As a result, there is no table in the database. To resolve this, I have provided a zip file containing the necessary migrations. Run the project and proceed with it.

Share: