id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 26205 migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py D nobody "Only occurs with a sqlite engine where the command ""PRAGMA foreign_keys"" returns nothing (instead of returning 0 or 1). This happens (at least) on sqlite3 v 3.3.6. Doesn't occur on 3.8.11. The net effect is that the following manage.py comands fail; migrate makemigrations test plus other commands if they trigger a migration. Changing line 25 of django/db/backends/sqlite3/schema.py from this; {{{ self._initial_pragma_fk = c.fetchone()[0] }}} to this {{{ self._initial_pragma_fk = 0 # c.fetchone()[0] }}} enables you to proceed with the migration. " Uncategorized closed Database layer (models, ORM) 1.9 Normal needsinfo schema.py PRAGMA NonType migrate Unreviewed 0 0 0 0 0 0