如何修复 - 没有这样的表:main.auth_user__old [英] How to fix-no such table: main.auth_user__old

查看:18
本文介绍了如何修复 - 没有这样的表:main.auth_user__old的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以详细解释如何修复ERROR: no such table: main.auth_user__old

Can someone give a detailed explanation on how to fix the ERROR: no such table: main.auth_user__old

当我尝试将数据添加到我注册的模型时,它出现在我的 Django 应用程序中.

It arises in my Django application when I am trying to add data to my registered models.

推荐答案

我已经使用下面的方法解决了这个问题:

I have solved this issue using below :

1) 删除db.sqlit3

1) Delete the db.sqlit3

2) app 所在目录删除 pycache 中的所有内容

2) app's directory delete everything in pycache

3) manage.py makemigrations, manage.py migrate, manage.py createsuperuser 然后 manage.py runserver.

3) manage.py makemigrations, manage.py migrate, manage.py createsuperuser and then manage.py runserver.

这篇关于如何修复 - 没有这样的表:main.auth_user__old的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆