feat: per-profile separate SQLite logbook file (config never swapped)

Design flaw: the SQLite backend conflated the app/config database (opslog.db —
settings + profiles) with the QSO logbook. connectLogbook returned a.db for any
non-MySQL profile, so the ONLY way to get a separate SQLite logbook was the
whole-app "change database location" pointer — which swapped config + profiles
too, wiping the operator's setup (reported: creating Jerem.db lost all configs).

profile.ProfileDB gains a Path field: a non-empty path routes that profile's
logbook to its own SQLite file (db.Open creates + migrates it on first use),
while opslog.db keeps settings/profiles. connectLogbook opens the file; empty
path = shared db (unchanged default, backward compatible). MySQLSettings carries
sqlite_path; Get/Save wire it through.

UI: the Database panel gains a third backend option "SQLite — separate file"
with a file picker, and now clearly labels the shared application database
(settings + profiles) vs this profile's logbook, so the two are never confused.
This commit is contained in:
2026-07-24 17:12:31 +02:00
parent bf4fba484a
commit 638ffcb326
6 changed files with 80 additions and 11 deletions
+4
View File
@@ -2315,6 +2315,7 @@ export namespace main {
user: string;
password: string;
database: string;
sqlite_path?: string;
static createFrom(source: any = {}) {
return new MySQLSettings(source);
@@ -2328,6 +2329,7 @@ export namespace main {
this.user = source["user"];
this.password = source["password"];
this.database = source["database"];
this.sqlite_path = source["sqlite_path"];
}
}
export class OfflineStatus {
@@ -3365,6 +3367,7 @@ export namespace profile {
user: string;
password: string;
database: string;
path?: string;
static createFrom(source: any = {}) {
return new ProfileDB(source);
@@ -3378,6 +3381,7 @@ export namespace profile {
this.user = source["user"];
this.password = source["password"];
this.database = source["database"];
this.path = source["path"];
}
}
export class Profile {