From 060a94327220a61d72b2f064b2d170639bff866a Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 9 Jan 2025 01:41:33 +0100 Subject: create T_ENTRIES table in resource cache on startup --- shared/src/store.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shared/src') diff --git a/shared/src/store.rs b/shared/src/store.rs index 976960e..37e3ab1 100644 --- a/shared/src/store.rs +++ b/shared/src/store.rs @@ -28,7 +28,11 @@ pub enum ResourceStore { } impl ResourceStore { pub fn new_persistent(path: &Path) -> Result { - Ok(Self::Redb(Database::create(path)?)) + let db = Database::create(path)?; + let txn = db.begin_write()?; + txn.open_table(T_ENTRIES)?; + txn.commit()?; + Ok(Self::Redb(db)) } pub fn new_memory() -> Self { Self::Memory(HashMap::new().into()) -- cgit v1.2.3-70-g09d2