You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could store a "database structure serial" in the db and check it every time it's loaded, to detect when the structure changes.
A good example of how database migrations can be done is in the database/sqlite module. The goal of this issue is to add general support for any database module to update to a new structure when required.
Expected Outcomes
Create a new trait and possibly structs in the database module to support database schema migration
Implement or update database migration for the keyvalue and sqlite modules
Any new public traits and structs should be documented
New trait implementations should have basic unit tests
Error if database schema version is > version in code (ie. using older code on database migrated with newer version)
DB schema migration/upgrades are being done in #376 but only for the sqliteDatabase. Could we handle this as a Database specific feature? in that case we'd only need to add it as an internal part of the key-value DB.
We don't have a Database trait anymore so this issue is stale. We could allow people to migrate from one persistence backend to another generically -- this would be pretty easy now. But that feels like another issue.
Activity
notmandatory commentedon Sep 21, 2021
DB schema migration/upgrades are being done in #376 but only for the
sqliteDatabase. Could we handle this as aDatabasespecific feature? in that case we'd only need to add it as an internal part of the key-value DB.LLFourn commentedon Sep 24, 2021
^ can we add some kind of "transparently handle db upgrade architecture" task to upcoming hackathon?
notmandatory commentedon Dec 16, 2021
Per our team chat yesterday I changed this into a summer-of-bitcoin project.
LLFourn commentedon Jan 22, 2024
We don't have a
Databasetrait anymore so this issue is stale. We could allow people to migrate from one persistence backend to another generically -- this would be pretty easy now. But that feels like another issue.