python - 生成新的 SQLite 数据库 django

标签 python django web

我有一个重复的 sqlite 数据库。我尝试删除重复项,但同时删除了两者。有没有办法生成新的数据库?数据并不是特别重要。

最佳答案

安装 django-extensions 可用于重置数据库。

然后运行
python manage.py reset_db
然后
python manage.py migrate

关于python - 生成新的 SQLite 数据库 django,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29991871/

相关文章:

web - 创建在 OpenCMS 上运行的网站的移动版本的选项?

python标准输入eof

python - AWS Lambda 在 S3 存储桶上触发到 Neptune "Failed to start new load for the source"

python - pickle 加载错误

javascript - 使用 Jquery 的 Django POST 方法

javascript - 从脚本 : "Data table is not defined" 中的电子表格获取数据

python - 理解Python中的父/子类

python - 如何在 Django 中基于类的 ListView 中添加类似按钮

python - Django - GeoDjango 以错误的顺序读取坐标

image - 在 Azure 中优化和托管镜像?