Ticket #17762: django-17762.patch

File django-17762.patch, 836 bytes (added by Aron Grififs, 13 years ago)
  • django/db/backends/sqlite3/creation.py

     
    7272
    7373    def set_autocommit(self):
    7474        self.connection.connection.isolation_level = None
     75
     76    def test_db_signature(self):
     77        """
     78        Returns a tuple that uniquely identifies a database.
     79
     80        This takes into account the special cases of ":memory:" and "" for
     81        SQLite since the databases will be distinct despite having the same
     82        NAME. See http://www.sqlite.org/inmemorydb.html
     83        """
     84        sig = (self.connection.settings_dict['NAME'],)
     85        if name in [':memory:', '']:
     86            sig += (id(self.connection),)
     87        return sig
Back to Top