如何在Django项目中访问SQLite的db shell? [英] How do I access the db shell for SQLite on a Django project?

查看:291
本文介绍了如何在Django项目中访问SQLite的db shell?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经通知了一个变量的列,以允许在一个db shell中为空,以便我不需要删除我的表。 data.sqlite 存在于主文件夹中, sqlite3.db 位于主应用程序子文件夹中。这是为什么?我想要访问哪一个?



我知道他们是2个不同的文件,并且在2个不同的目录中,这是当Django项目生成时的标准配置。我想我的问题是这两个文件有什么区别,如果有一个原因他们不在同一个文件夹。谢谢!

解决方案

与所有数据库后端一样:

 code> ./ manage.py dbshel​​l 


I am trying to update the column on a variable to allow null in a db shell so that I don't have to drop my table.

I have notice data.sqlite lives on the main folder and sqlite3.db lives on the "main app" subfolder. Why is that? Which one is the one I want to access?

I know they are 2 different files and in 2 different directories and that this is the standard configuration when a Django project is generated. I guess my question is what is the difference between this two files and if there is a reason they are not in the same folder. Thank!

解决方案

As with all database backends:

./manage.py dbshell

这篇关于如何在Django项目中访问SQLite的db shell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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