orbit-db-pinner icon indicating copy to clipboard operation
orbit-db-pinner copied to clipboard

Versioning / Migrations

Open aphelionz opened this issue 3 years ago • 0 comments

As the pinner develops, the schema in which the pinning database and pinned dbs are stored on the filesystem will change over time. As with any such thing, to prevent losing data, we'll need migrations... but before that, we'll need versioning.

I'm thinking we utilize the meta field in the manifest for the pinning db for this, by storing a pinning-schema-version key that's just a monotoncially increasing integer starting with 1.

Then, the first migration would be null -> 1, migrating databases that don't have the pinning-schema-version meta key to databases that do.

aphelionz avatar Aug 31 '20 22:08 aphelionz