From ed09750598a1748b7a01e8c50854d596a136b1e5 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Thu, 24 Jul 2025 13:07:07 +0200 Subject: [PATCH] feat : add migration for kuzu 0.8.2 as well --- .../databases/graph/kuzu/adapter.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cognee/infrastructure/databases/graph/kuzu/adapter.py b/cognee/infrastructure/databases/graph/kuzu/adapter.py index 386a06dc7..5bc03ed36 100644 --- a/cognee/infrastructure/databases/graph/kuzu/adapter.py +++ b/cognee/infrastructure/databases/graph/kuzu/adapter.py @@ -83,7 +83,9 @@ class KuzuAdapter(GraphDBInterface): import kuzu kuzu_db_version = read_kuzu_storage_version(self.db_path) - if kuzu_db_version == "0.9.0" and kuzu_db_version != kuzu.__version__: + if ( + kuzu_db_version == "0.9.0" or kuzu_db_version == "0.8.2" + ) and kuzu_db_version != kuzu.__version__: # TODO: Write migration script that will handle all user graph databases in multi-user mode # Try to migrate kuzu database to latest version from .kuzu_migrate import kuzu_migration @@ -95,11 +97,12 @@ class KuzuAdapter(GraphDBInterface): old_version=kuzu_db_version, overwrite=True, ) - self.db = Database( - self.db_path, - buffer_pool_size=2048 * 1024 * 1024, # 2048MB buffer pool - max_db_size=4096 * 1024 * 1024, - ) + + self.db = Database( + self.db_path, + buffer_pool_size=2048 * 1024 * 1024, # 2048MB buffer pool + max_db_size=4096 * 1024 * 1024, + ) self.db.init_database() self.connection = Connection(self.db)