earthstar-project / willow-js

A Willow Data Model, Sideloading, and General Purpose Sync protocol implementation in TypeScript.
https://willowprotocol.org
GNU Lesser General Public License v3.0
47 stars 3 forks source link

fix: Make PayloadDriverIndexedDB use different DB #25

Closed sgwilym closed 4 months ago

sgwilym commented 4 months ago

Both the KV and Payload drivers for IndexedDB used a database named ‘willow’ with the same version number. This meant that when either driver opened after the other, they would not detect that any DB upgrade would be needed, and fail to create their own necessary object stores.

I’ve fixed this by making the payload driver open a database named willow_payloads.

Thanks to @Vicente015 for identifying the bug!