Django tests complain of missing tables

前端 未结 3 1874
-上瘾入骨i
-上瘾入骨i 2020-12-08 11:22

When I run my test dealing with my Customer model, I get the following error:

DatabaseError: (1146, \"Table \'test_mcif2.customer\' doesn\'t exi         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 12:12

    There's not enough info above to answer your first question. However, once you get that issue resolved you'll probably want to install django-extensions for the following reason: It has an incredibly useful sqldiff command that will inform you if there's a mismatch between the legacy database and your application model.

提交回复
热议问题