Fix compatibility with SQLite in Django 1.6.