#30055: Drop support for SQLite < 3.8.3
-------------------------------------+-------------------------------------
     Reporter:  Tim Graham           |                    Owner:  Tim
         Type:                       |  Graham
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * cc: Simon Charette (added)


Comment:

 I think I ran into this when adding Django 2.2 testing to django-hosts.
 Travis CI still uses trusty (Ubuntu 14.04) by default which has SQLite
 3.8.2. All the tests [https://travis-ci.org/jazzband/django-
 hosts/jobs/483074583 failed] like this:
 {{{
 self = <django.db.backends.utils.CursorWrapper object at 0x2b19ed9ba9b0>
 sql = '\n                            SELECT REFERRING.`id`,
 REFERRING.`site_id` FROM `tests_author` as REFERRING\n          ...
 WHERE REFERRING.`site_id` IS NOT NULL AND REFERRED.`id` IS NULL\n
 '
 params = None
 ignored_wrapper_args = (False, {'connection':
 <django.db.backends.sqlite3.base.DatabaseWrapper object at
 0x2b19ed23a390>, 'cursor': <django.db.backends.utils.CursorWrapper object
 at 0x2b19ed9ba9b0>})
     def _execute(self, sql, params, *ignored_wrapper_args):
         self.db.validate_no_broken_transaction()
         with self.db.wrap_database_errors:
             if params is None:
 >               return self.cursor.execute(sql)
 }}}
 and
 {{{

 self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at
 0x2b19ed99d1f8>
 query = '\n                            SELECT REFERRING.`id`,
 REFERRING.`site_id` FROM `tests_author` as REFERRING\n          ...
 WHERE REFERRING.`site_id` IS NOT NULL AND REFERRED.`id` IS NULL\n
 '
 params = None
     def execute(self, query, params=None):
         if params is None:
 >           return Database.Cursor.execute(self, query)
 E           sqlite3.OperationalError: no such table: django_site
 }}}
 I think we should either warn about this in the documentation (e.g. if you
 get this error, check your SQLite version) or add a SQLite version check
 somewhere to show a helpful message.

 I thought the issue was an unsupported query in
 
[https://github.com/django/django/blob/bff748df3e1e1c0077e02df2b77bda2b827ad129/django/db/backends/sqlite3/base.py#L315-L336
 DatabaseWrapper.check_constraints()] but I bisected the failures to
 7289874adceec46b5367ec3157cdd10c711253a0.

 More investigation might be needed to ensure that SQLite 3.8.3 resolves
 this issue.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30055#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f1eb946f236604d88d37d4cafe590390%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to