返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
0_Django基础知识

Django: Clear All Data and Rebuild Table Structure

Clear all data python manage.py flush Rebuild table structure Delete all tables in the database Delete all files in the migrations directory under the app folder, except __init__.py Run the following commands python manage.py makemigrations python manage.py migrate

曦远 (DealiAxy)约 1 分钟
目录2 个章节

Clear All Data

python manage.py flush

Rebuild Table Structure

  1. Delete all tables in the database
  2. Delete all files in the migrations directory under the app folder, except __init__.py
  3. Run the following commands
python manage.py makemigrations
python manage.py migrate

_EOF_

Django: Clear All Data and Rebuild Table Structure

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

JavaWeb开发---使用IDEA创建Servlet程序

前言 最近做项目需要,从之前熟悉的PHP和Python转到了JavaWeb,所以就有了这个笔记。资源图片都是来自网上的资源,根据自己的实际操作应用,做了总结归纳。 所需工具 JDK Tomcat IDEA 创建工程 设置工程名字: 创建完成后工程结构如下: 上面的图片是在网络上复制的,好像我用的IDEA 2017.3.2没有这个Create web.xml的选项,我也不知道为啥,难道是IDEA越更

2021-12-18 · Java · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…