(self, db_path: str = None)
| 6 | |
| 7 | class ChatDatabase: |
| 8 | def __init__(self, db_path: str = None): |
| 9 | if db_path is None: |
| 10 | # Auto-detect environment and set appropriate path |
| 11 | import os |
| 12 | if os.path.exists("/app"): # Docker environment |
| 13 | self.db_path = "/app/backend/chat_data.db" |
| 14 | else: # Local development environment |
| 15 | self.db_path = "backend/chat_data.db" |
| 16 | else: |
| 17 | self.db_path = db_path |
| 18 | self.init_database() |
| 19 | |
| 20 | def init_database(self): |
| 21 | """Initialize the SQLite database with required tables""" |
nothing calls this directly
no test coverage detected