From f0210453a60c96b33b24aef4c04730773c97b446 Mon Sep 17 00:00:00 2001 From: mpostma Date: Fri, 12 Mar 2021 14:43:17 +0100 Subject: [PATCH] add updated at on put primary key --- milli/src/index.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/milli/src/index.rs b/milli/src/index.rs index cf31b54a8..a14747788 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -142,6 +142,7 @@ impl Index { /// Writes the documents primary key, this is the field name that is used to store the id. pub fn put_primary_key(&self, wtxn: &mut RwTxn, primary_key: &str) -> heed::Result<()> { + self.set_updated_at(wtxn, &Utc::now())?; self.main.put::<_, Str, Str>(wtxn, PRIMARY_KEY_KEY, &primary_key) }