add db migrations and restore config on unlock

This commit is contained in:
jfmonty2 committed 2026-11-18 05:49:45 -05:00
1 parent a10510ed6e
commit 0798124811
12 files changed
+365 -41

No files matched your search

+9 -3
View File
@@ -16,12 +16,18 @@ pub enum CreddyError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Unable to load saved configuration: {0}")]
ConfigDecode(#[from] serde_json::Error),
#[error("Unable to hash password: {0}")]
PasswordHash(#[from] argon2::Error),
#[error("Unable to get random data: {0}")]
Entropy(#[from] getrandom::Error),
#[error("This database was created by a newer version of Creddy (unknown migration {0})")]
DbTooNew(String),
#[error("Migration {0} was applied before an earlier migration that hasn't been")]
MigrationOutOfOrder(String),
#[error("Invalid JSON: {0}")]
InvalidJSON(#[from] serde_json::Error),
}