InvalidBasesError: Cannot resolve bases for []

后端 未结 14 1182
遥遥无期
遥遥无期 2021-02-03 23:03

When I run tests I get this error during database initialization:

django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [

        
14条回答
  •  Happy的楠姐
    2021-02-03 23:32

    I had this problem after I renamed the parent table of a bunch of my proxy models. I resolved it by:

    1. Deleting the migration file that had the name change for the parent table.
    2. Using the postgres terminal, I renamed the parent table to its previous name.
    3. Ran makemigrations and migrate again

提交回复
热议问题