MCPcopy Create free account
hub / github.com/chokcoco/iCSS / initializeDatabase

Method initializeDatabase

MCP/server.js:70–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 initializeDatabase() {
71 debugLog('🔧 Initializing database tables...');
72
73 const createTableSQL = `
74 CREATE TABLE IF NOT EXISTS issues (
75 id INTEGER PRIMARY KEY,
76 number INTEGER UNIQUE,
77 title TEXT NOT NULL,
78 body TEXT,
79 html_url TEXT,
80 labels TEXT,
81 created_at TEXT,
82 updated_at TEXT,
83 search_content TEXT
84 )
85 `;
86
87 this.db.run(createTableSQL, (err) => {
88 if (err) {
89 console.error('❌ Error creating table:', err);
90 this.dbInitFailed = true;
91 } else {
92 debugLog('✅ Database table initialized');
93 this.loadSearchIndex();
94 }
95 });
96 }
97
98 loadSearchIndex() {
99 debugLog('🔍 Loading search index...');

Callers 1

setupDatabaseMethod · 0.95

Calls 3

loadSearchIndexMethod · 0.95
debugLogFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected