【发布时间】:2021-12-19 21:51:54
【问题描述】:
有时我很明显地忘记了,这让我陷入了一个 30 分钟的黑洞,试图弄清楚为什么我的 constraints 没有被应用到我的测试中。原来我忘了运行makemigrations。有没有办法配置pytest 或django 在没有makemigrations 的情况下失败?
我知道如果非常清楚地警告我
Your models have changes that are not yet reflected in a migration, and so won't be applied.
只是在寻找更明显/在你脸上的东西?
【问题讨论】:
标签: django django-migrations pytest-django