Remove the Object Store

Learn to remove an object store from the IndexedDB database.

The deleteObjectStore() method

We can use the deleteObjectStore() method from the database object to delete the object store.

Syntax

deleteObjectStore(object_store_name)
Syntax of the deleteObjectStore method

This method takes the object store name as the argument. This method can only be called within a versionchangeInside upgradeneeded event event.

Note: We can’t create the versionchange ...