python - django:应用程序 x 中的迁移 x 没有迁移类

标签 python django postgresql django-migrations

这是准确的错误

django.db.migrations.loader.BadMigrationError: Migration 0001_initial in app django_comments has no Migration class

我不知道这意味着什么,也不知道该去哪里。我用我的 venv 做了一些工作,制作了一个新的,然后我试图让一切恢复正常。安装这个那个...我忘记了我正在做的一切,因为我的笔记本电脑坏了,这让我很生气。

知道从这里到哪里去吗?

编辑:

如果我尝试升级 django_comments,我会收到以下错误:

 Could not find a version that satisfies the requirement django-comments (from versions: 0.2a, 0.3.1a, 0.3.2a, 0.3.3a, 0.3a, 1.0.0.b, 1.0.0.b, 1.0.0.b)

正在清理... 没有与 django-comments 版本匹配的发行版 在/home/jeff/.pip/pip.log 中存储失败的调试日志

最佳答案

我遇到了这个问题,事实证明我不小心将一个非迁移文件复制到了我的一个迁移文件夹中。删除错误文件为我解决了这个问题。

关于python - django:应用程序 x 中的迁移 x 没有迁移类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34219615/

相关文章:

postgresql - 你如何找到当前的 postgres virtualtransaction id?

python - 如何润色/完善 wxPython TextCtrls 的定位和外观?

python - 如何在不重新运行脚本的情况下重置 matplotlib 动画

python - 括号 URL 调度程序 Django?

python - Django、urls.py、include 似乎不起作用

ruby - 如何使用 Sequel gem 将 full_text_search 与 unaccent 结合起来?

Python expandtabs 字符串操作

python - HTTP 303 (SeeOther) : GET Works, POST 失败

Python 3 升级 : uninstall/reinstall 3. 6-3.7 — 现在我无法安装 Django 2.1:错误消息:[没有名为 Django 的模块]

postgresql - 我怎么知道 Postgres 表的统计信息是否是最新的?