报错 django.db.migrations.exceptions.InconsistentMigrationHistory
2017-04-10 18:37
627 查看
替换 auth_user 报错的解决办法
把数据库的的表全部删除,再重新 migrate 一次就好了…
刚才往前边翻了一下, 原来这种错误我以前遇到过的…
Traceback (most recent call last): File "C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\helpers\pycharm\django_manage.py", line 43, in <module> run_module(manage_file, None, '__main__', True) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:/Users/rHotD/Documents/GitHub/Online-education-platform-Imooc/MxOnline\manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line utility.execute() File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\base.py", line 345, in execute output = self.handle(*args, **options) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\commands\migrate.py", line 86, in handle executor.loader.check_consistent_history(connection) File "C:\Users\rHotD\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\loader.py", line 292, in check_consistent_history connection.alias, django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.0001_initial on database 'default'.
把数据库的的表全部删除,再重新 migrate 一次就好了…
刚才往前边翻了一下, 原来这种错误我以前遇到过的…
相关文章推荐
- django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applie
- 【Django】-- django.db.migrations.exceptions.InconsistentMigrationHistory
- django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table
- OLE DB provider SQLOLEDB supplied inconsistent metadata. An extra column was supplied during execution that was not found at com
- Berkeley DB 以及 DB_SECONDARY_BAD: Secondary index inconsistent with primary 问题
- 7.8-7.10 JLL实习日志-DjangoAPI+python+json,post for many records in a time
- The record in Sun certifications DB
- Use jquery POST in django
- python - Django In-Memory SQLite3 Database - Stack Overflow
- the line endings in the following file are not consistent.
- 给User添加Profile in Django
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Exception Handling in groovy
- java.lang.VerifyError: Inconsistent stackmap frames at branch target ? 解决
- 如何消除这个编译警告'Generate Browser Info' inconsistent with precompiled header
- Create built-in tables in your own database to handle exceptions, Part 1
- Imagemagick + vs2008 的error C3163: '_vsnprintf': attributes inconsistent with previous declaration 编译错误
- ASP.NET MVC 学习6、学习使用Code First Migrations功能,把Model的更新同步到DB中
- OGG-00685 begin time <time> prior to oldest log in log history
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.django入门实践
- django querty set db hit