src/adapters/indexed-db.js
function onupgradeneeded() {
            self.db = request.result;
            self.transaction = request.transaction;

            // NB! in case of a version conflict, we don't try to migrate,
            // instead just throw away the old store and create a new one.
            // this happens if somebody changed the 
            try {
                self.db.deleteObjectStore(self.record);
            } catch (e) { /* ignore */ }

            // create object store.
            var objectStoreOptions = {
                autoIncrement: useAutoIncrement()
            }
            if( typeof( self.keyPath )) {
                objectStoreOptions.keyPath = self.keyPath;
            }
            self.db.createObjectStore(self.record, objectStoreOptions);
        }
function onupgradeneeded() {
            self.db = request.result;
            self.transaction = request.transaction;

            // NB! in case of a version conflict, we don't try to migrate,
            // instead just throw away the old store and create a new one.
            // this happens if somebody changed the 
            try {
                self.db.deleteObjectStore(self.record);
            } catch (e) { /* ignore */ }

            // create object store.
            var objectStoreOptions = {
                autoIncrement: useAutoIncrement()
            }
            if( typeof( self.keyPath )) {
                objectStoreOptions.keyPath = self.keyPath;
            }
            self.db.createObjectStore(self.record, objectStoreOptions);
        }
function onupgradeneeded ( ) { self . db = request . result ; self . transaction = request . transaction ; // NB! in case of a version conflict, we don't try to migrate, // instead just throw away the old store and create a new one. // this happens if somebody changed the  try { self . db . deleteObjectStore ( self . record ) ; } catch ( e ) { /* ignore */ } // create object store. var objectStoreOptions = { autoIncrement : useAutoIncrement ( ) } if ( typeof ( self . keyPath ) ) { objectStoreOptions . keyPath = self . keyPath ; } self . db . createObjectStore ( self . record , objectStoreOptions ) ; }
first start or indexeddb needs a version upgrade
first start or indexeddb needs a version upgrade