Skip to content

database: versioning #102

@JoeGruffins

Description

@JoeGruffins

Currently objects track their own versioning. We don't have a decided way to update values already in the db to a new version. If the version is incorrect, the only thing to do is to wipe all values for that key and start over. The only way to do that is for the user to delete their wallet manually and restore from seed words. This is a bad ux.

dcrwallet has a seperate updating package and handles all updates at once on start-up. https://github.com/decred/dcrwallet/blob/master/wallet/udb/upgrades.go That seems like a good way to do things to me. If there's a problem it is best to stop at startup rather than half way through doing something when you get a random exception, as will be the case if we have each object handle its own versioning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions