Skip to content

can not create store with exsisting db #65

Description

@Nagaraj104065

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions