Not a typo, is it?  "on upgrade needed" .  Google for 'onupgradeended' gives no results.  

https://developer.mozilla.org/en-US/docs/IndexedDB/Using_IndexedDB#Creating_or_updating_the_version_of_the_database

"To update the schema of the database, i.e. creating or deleting object stores, you implement the `onupgradeneeded` handler