aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/history.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-03-20 21:26:37 +0000
committerGitHub <noreply@github.com>2023-03-20 21:26:37 +0000
commit13514b635c139f5bd9177b1b30b005d39045db54 (patch)
treecba6329f67a18f50b97a5c8e3a65ddbee1302295 /atuin-client/src/history.rs
parentfix: paste into terminal after switching modes (#793) (diff)
downloadatuin-13514b635c139f5bd9177b1b30b005d39045db54.zip
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 <conradludgate@gmail.com> * Bye bye unwrap --------- Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
Diffstat (limited to 'atuin-client/src/history.rs')
-rw-r--r--atuin-client/src/history.rs15
1 files changed, 15 insertions, 0 deletions
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<chrono::DateTime<Utc>>,
}
+// 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<Utc>,
+ 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(