热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

django.db.migrations.exceptions.InconsistentMigrationHistorydjango报错

把数据库的的表全部删除,再重新migrate报错信息如下:Traceback(mostrecentcalllast):FileApplications

把数据库的的表全部删除,再重新 migrate

报错信息如下:

Traceback (most recent call last):File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_manage.py", line 43, in run_module(manage_file, None, '__main__', True)File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 205, in run_modulereturn _run_module_code(code, init_globals, run_name, mod_spec)File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 96, in _run_module_codemod_name, mod_spec, pkg_name, script_name)File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_codeexec(code, run_globals)File "/Users/h/Desktop/py/MxOnline/manage.py", line 15, in execute_from_command_line(sys.argv)File "/Users/h/Desktop/pyenv/h1/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_lineutility.execute()File "/Users/h/Desktop/pyenv/h1/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in executeself.fetch_command(subcommand).run_from_argv(self.argv)File "/Users/h/Desktop/pyenv/h1/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argvself.execute(*args, **cmd_options)File "/Users/h/Desktop/pyenv/h1/lib/python3.6/site-packages/django/core/management/base.py", line 335, in executeoutput = self.handle(*args, **options)File "/Users/h/Desktop/pyenv/h1/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 82, in handleexecutor.loader.check_consistent_history(connection)File "/Users/h/Desktop/pyenv/h1/lib/python3.6/site-packages/django/db/migrations/loader.py", line 291, in check_consistent_historyconnection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial
is applied before its dependency users.0001_initial on database 'default'.

 

转:https://www.cnblogs.com/Jiangchuanwei/p/9100609.html



推荐阅读
author-avatar
好1男1人_329
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有