fix: Resolve infinite SQLite logging loop blocking Electron startup

- Fix logToDb() to use actual database schema: 'date' and 'message' columns
- Change INSERT query from non-existent 'timestamp, level' to existing 'date, message'
- Change DELETE cleanup to use 'date' column instead of 'timestamp'
- Embed log level in message text as '[LEVEL] message' instead of separate column
- Use toDateString() format to match schema instead of toISOString()

Resolves: "table logs has no column named timestamp" infinite error loop
Critical: Enables Electron app initialization by matching code to existing schema
Impact: Stops database logging from crashing and allows normal app startup
This commit is contained in:
Matthew Raymer
2025-07-01 05:15:06 +00:00
parent a4c44ff052
commit a41ce0cd4c
6 changed files with 131 additions and 610 deletions

View File

@@ -3,10 +3,10 @@ description:
globs:
alwaysApply: true
---
use system date command to timestamp all interactions with accurate date and time
python script files must always have a blank line
remove whitespace at the end of lines
never git commit automatically. always preview commit message to user allow copy and paste by the user
use system date command to timestamp all interactions with accurate date and time
never git add or commit for me. always preview changes and commit message to use and allow me to copy and paste
✅ Preferred Commit Message Format
Short summary in the first line (concise and high-level).