Django: x migration in application x missing Migration class

here is the exact error

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

I have no idea what that means, and I don't know where to go. I did some work with my wreath, creating a new one, and then I tried to return everything to normal. Installing this and that ... I lost everything I did because my laptop passed away, which really pissed me off.

Any idea where to go from here?

EDIT:

If I try to update django_comments, I get the following error:

 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)

Cleaning up ... There are no distributions matching this version for django-comments Saving the debug log for failure in / home / jeff / .pip / pip.log

+4
source share
3 answers

, , , django , , script. script , django . django_migrations, , . :

  • db , ,
  • , django_migrations , django_comments , , , .
+1

, , . .

+3

You are probably using an old version django-contrib-commentsthat supports Django 1.6. It will have southern folder migrations/migrations instead of new Django migrations.

To fix this, simply update django-contrib-comments:

pip install -U django-contrib-comments
+2
source

Source: https://habr.com/ru/post/1619458/


All Articles