Django incorrectly expecting id column

后端 未结 1 1176
离开以前
离开以前 2021-01-07 03:32

I\'m working with an existing SQL database in Django. These tables for some reason were never given primary keys so I\'m just going through and assigning them ones. In one o

相关标签:
1条回答
  • 2021-01-07 03:50

    You could fake a migration only including removing the "id" field using the --fake option when migrating, so django thinks that it had deleted the id field when really it never existed.

    0 讨论(0)
提交回复
热议问题