返回文章列表文章索引阅读全文
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 许可协议。转载请注明出处!

相关文章

讨论

共 0 条

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

加载评论中…