From c9a453289e2fea97b5ac17e265f99332edcdcd4c Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 2 Feb 2024 15:05:07 +0000 Subject: feat: add `store push --force` This will 1. Wipe the remote store 2. Upload all of the local store to remote Imagine the scenario where you end up with some mixed keys locally :( You confirm this with ``` atuin store verify ``` You then fix it locally with ``` atuin store purge ``` Ensure that your local changes are reflected remotely with ``` atuin store push --force ``` and then (another PR, coming soon), update all other hosts with ``` atuin store pull --force ``` --- atuin-server-database/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'atuin-server-database/src/lib.rs') diff --git a/atuin-server-database/src/lib.rs b/atuin-server-database/src/lib.rs index dff1204d..d2c16b3d 100644 --- a/atuin-server-database/src/lib.rs +++ b/atuin-server-database/src/lib.rs @@ -53,15 +53,16 @@ pub trait Database: Sized + Clone + Send + Sync + 'static { async fn get_user(&self, username: &str) -> DbResult; async fn get_user_session(&self, u: &User) -> DbResult; async fn add_user(&self, user: &NewUser) -> DbResult; - async fn delete_user(&self, u: &User) -> DbResult<()>; async fn update_user_password(&self, u: &User) -> DbResult<()>; async fn total_history(&self) -> DbResult; async fn count_history(&self, user: &User) -> DbResult; async fn count_history_cached(&self, user: &User) -> DbResult; + async fn delete_user(&self, u: &User) -> DbResult<()>; async fn delete_history(&self, user: &User, id: String) -> DbResult<()>; async fn deleted_history(&self, user: &User) -> DbResult>; + async fn delete_store(&self, user: &User) -> DbResult<()>; async fn add_records(&self, user: &User, record: &[Record]) -> DbResult<()>; async fn next_records( -- cgit v1.3.1