Merge pull request #2446 from danielaskdd/fix-postgres

fix(postgres): Add CASCADE to AGE extension creation for automatic dependency resolution
This commit is contained in:
Daniel.y 2025-12-02 00:27:59 +08:00 committed by GitHub
commit 48b6a6df37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}")