()
| 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...'); |
no test coverage detected