Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not create store with exsisting db #65

Open
Nagaraj104065 opened this issue Apr 24, 2018 · 3 comments
Open

can not create store with exsisting db #65

Nagaraj104065 opened this issue Apr 24, 2018 · 3 comments

Comments

@Nagaraj104065
Copy link

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});
});
}

@thiagoalmedeiros
Copy link

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

@Nagaraj104065
Copy link
Author

Bro use localForage

@Nagaraj104065
Copy link
Author

Nagaraj104065 commented Dec 1, 2018

This problem happening due to the DB version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants