From d6019c82afa543ea3b248861c894fe11f226abb5 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 2 Dec 2025 00:17:41 +0800 Subject: [PATCH] Add CASCADE to AGE extension creation in PostgreSQL implementation - Add CASCADE option to CREATE EXTENSION - Ensure dependencies are installed - Fix potential AGE setup issues --- lightrag/kg/postgres_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index 1447a79e..49069ce3 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -383,7 +383,7 @@ class PostgreSQLDB: async def configure_age_extension(connection: asyncpg.Connection) -> None: """Create AGE extension if it doesn't exist for graph operations.""" try: - await connection.execute("CREATE EXTENSION IF NOT EXISTS age") # type: ignore + await connection.execute("CREATE EXTENSION IF NOT EXISTS AGE CASCADE") # type: ignore logger.info("PostgreSQL, AGE extension enabled") except Exception as e: logger.warning(f"Could not create AGE extension: {e}")