发布时间:2019-07-02 13:39:03编辑:auto阅读(2555)
# 方式一
# 
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete
# 
python manage.py makemigrations
python manage.py migrate
# 方式二
# 查看migrations
python manage.py showmigrations
# 删除migrations文件,硬清理migration
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete
# 软清理Migration
python manage.py migrate --fake yourapp zero
# 查看migrations
python manage.py showmigrations
# 生成migrations
python manage.py makemigrations
# 虚拟重置Migrate
python manage.py migrate --fake-initial
# 方式三
# 新起一个Django Project
# 配置服务器连接
# 配置Model
# makemigrations 
# migrate
# 注意:
django插件的重置,需要到site-packages目录下删除migrations文件
# 参考连接
export REFER_PAGE="https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html"
上一篇: python学习之列表
下一篇: Python 学习日记第二篇 -- 列表
 51194
 50609
 41233
 38051
 32513
 29420
 28281
 23136
 23094
 21432
 1488°
 2202°
 1825°
 1753°
 2064°
 1813°
 2498°
 4193°
 4055°
 2894°