MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / init_db

Function init_db

generation/app/database.py:52–58  ·  view source on GitHub ↗

Initialize database tables and enable WAL mode for SQLite.

()

Source from the content-addressed store, hash-verified

50
51
52async def init_db():
53 """Initialize database tables and enable WAL mode for SQLite."""
54 async with engine.begin() as conn:
55 await conn.run_sync(Base.metadata.create_all)
56 if "sqlite" in settings.database_url:
57 await conn.execute(text("PRAGMA journal_mode=WAL"))
58 await conn.execute(text("PRAGMA busy_timeout=30000"))
59
60
61async def close_db():

Callers 3

cmd_import_personasFunction · 0.90
initializeMethod · 0.90
lifespanFunction · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected