angular2-indexeddb icon indicating copy to clipboard operation
angular2-indexeddb copied to clipboard

can not create store with exsisting db

Open Nagaraj104065 opened this issue 7 years ago • 3 comments

Hi, i have some problem when i am creating new store in existing indexed db. it is not created after i have deleted the existing db in the browser . its working how to solve that . my code is:

createStore(name: string): Promise { const self = this; if (!!this.db.dbWrapper.validateStoreName(name)) { alert('yes already exists'); return; } return this.db.openDatabase(self.db.dbWrapper.db.version + 1, (evt) => { const objectStore = evt.currentTarget.result.createObjectStore( name, {keyPath: 'id', autoIncrement: true}); objectStore.createIndex('name', 'name', {unique: false}); objectStore.createIndex('email', 'email', {unique: false}); }); }

Nagaraj104065 avatar Apr 24 '18 11:04 Nagaraj104065

Ia have the same problem. Can you solve it? @Nagaraj104065

thiagoalmedeiros avatar Dec 01 '18 17:12 thiagoalmedeiros

Bro use localForage

Nagaraj104065 avatar Dec 01 '18 17:12 Nagaraj104065

This problem happening due to the DB version

Nagaraj104065 avatar Dec 01 '18 17:12 Nagaraj104065