From 13514b635c139f5bd9177b1b30b005d39045db54 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 20 Mar 2023 21:26:37 +0000 Subject: Support old msgpack (#794) * Support old msgpack I forgot it isn't backwards compatible... This should fix any sync issues resulting from the deletion PR * Update atuin-client/src/encryption.rs Co-authored-by: Conrad Ludgate * Bye bye unwrap --------- Co-authored-by: Conrad Ludgate --- atuin-client/src/history.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'atuin-client/src/history.rs') diff --git a/atuin-client/src/history.rs b/atuin-client/src/history.rs index f3778612..a710db2b 100644 --- a/atuin-client/src/history.rs +++ b/atuin-client/src/history.rs @@ -19,6 +19,21 @@ pub struct History { pub deleted_at: Option>, } +// Forgive me, for I have sinned +// I need to replace rmp with something that is more backwards-compatible. +// Protobuf, or maybe just json +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, sqlx::FromRow)] +pub struct HistoryWithoutDelete { + pub id: String, + pub timestamp: chrono::DateTime, + pub duration: i64, + pub exit: i64, + pub command: String, + pub cwd: String, + pub session: String, + pub hostname: String, +} + impl History { #[allow(clippy::too_many_arguments)] pub fn new( -- cgit v1.3.1