create script to manage indexeddb