Handling of `onupgradeneeded` event should be customizable
Hi. Thanks for creating this issue. Can you explain your use case that requires custom upgrade handling?
Database upgrades can require more than just the addition and deletion of object stores. They sometimes involve adding fields, merging object stores, changing the layout of an ArrayBuffer field, etc.
Hi @dullbananas, this feature will be added to rexie. But, I'm not sure of timeline yet. In the meantime, you can try using idb crate which offers similar functionality with support for custom upgrade handlers (but, it has a low level API which is more closer to indexed db API on the browser).
+1 to the utility of custom upgrade handlers. It's necessary to perform arbitrary migrations as data models evolve. I'll check out idb.
I know this is a roadmapped feature but how are people handling this at the moment until v0.5?
I know this is a roadmapped feature but how are people handling this at the moment until v0.5?
You can use idb crate if you want to customise the upgrade handler. The latest version of rexie also uses idb internally.