Code

Ticket #5203: sqlite_synchronous_revised.patch

File sqlite_synchronous_revised.patch, 826 bytes (added by jdetaeye, 7 years ago)

patch, updated

  • django/db/backends/sqlite3/base.py

     
    6767        # NB: The generated SQL below is specific to SQLite 
    6868        # Note: The DELETE FROM... SQL generated below works for SQLite databases 
    6969        # because constraints don't exist 
    70         sql = ['%s %s %s;' % \ 
     70        sql = ['%s %s = %s' % \ 
     71                (style.SQL_KEYWORD('PRAGMA'), 
     72                 style.SQL_KEYWORD('SYNCHRONOUS'), 
     73                 style.SQL_KEYWORD('OFF'))] + \ 
     74               ['%s %s %s;' % \ 
    7175                (style.SQL_KEYWORD('DELETE'), 
    7276                 style.SQL_KEYWORD('FROM'), 
    7377                 style.SQL_FIELD(self.quote_name(table))