MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / initializeDatabase

Function initializeDatabase

src/utils/database.js:153–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151export const db = new DatabaseWrapper();
152
153export async function initializeDatabase() {
154 try {
155 logger.info("Initializing Database (PostgreSQL > Memory fallback)...");
156 await db.initialize();
157 logger.info("✅ Database initialized");
158 return { db };
159 } catch (error) {
160 logger.error("❌ Database Initialization Error:", error);
161
162 if (error.code === 'SCHEMA_VERSION_MISMATCH') {
163 throw error;
164 }
165
166 return { db };
167 }
168}
169
170export async function getFromDb(key, defaultValue = null) {
171 try {

Callers 2

startMethod · 0.90

Calls 1

initializeMethod · 0.80

Tested by

no test coverage detected