Missing Table When Running Django Unittest with Sqlite3

前端 未结 12 1869
半阙折子戏
半阙折子戏 2021-01-03 23:42

I\'m trying to run a unittest with Django 1.3. Normally, I use MySQL as my database backend, but since this is painfully slow to spinup for a single unittest, I\'m using Sql

12条回答
  •  粉色の甜心
    2021-01-03 23:54

    Just to add another case to this:

    If you are trying to upgrade to 1.8 from 1.6 (or from a non-migration setup to a migration setup), you might hit this error if you haven't run created migrations.

    I had the same problem and had to create migrations so the test runner could use them, which was not intuitive because pre-migrations, the tests would just make a new DB based on doing syncdb, which always worked.

提交回复
热议问题