From 5def44c3496d202a6976f51ed1b483a81d944fd6 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Wed, 5 Nov 2025 10:36:00 +0000 Subject: [PATCH] fix(db): remove inline comments from migration 006 SQL Migration 006 was failing during database initialization because the SQLite plugin splits SQL statements on semicolons, and inline comments after semicolons were being treated as separate statements. When the last statement was comment-only (e.g., '-- Notification body text'), it caused an error. Fixed by removing all inline comments from the migration SQL. The comments are already documented in the TypeScript code, so they're not needed in the SQL itself. NOTE: We're experiencing database initialization problems with storing notification schedule data. The daily notification plugin was originally designed to store the schedule internally, which would be a better approach than storing it in our SQLite database. We should consider migrating to using the plugin's internal storage instead of adding these columns to the settings table. --- src/db-sql/migration.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/db-sql/migration.ts b/src/db-sql/migration.ts index 4a177786..7db68437 100644 --- a/src/db-sql/migration.ts +++ b/src/db-sql/migration.ts @@ -199,6 +199,14 @@ const MIGRATIONS = [ ALTER TABLE settings ADD COLUMN lastAckedStarredPlanChangesJwtId TEXT; `, }, + { + name: "006_add_nativeNotificationSettings_to_settings", + sql: ` + ALTER TABLE settings ADD COLUMN nativeNotificationTime TEXT; + ALTER TABLE settings ADD COLUMN nativeNotificationTitle TEXT; + ALTER TABLE settings ADD COLUMN nativeNotificationMessage TEXT; + `, + }, ]; /**