Return saved UI preferences for a user (accent + font). Falls back to DEFAULT_PREFS if nothing is saved yet.
(username: Optional[str])
| 1063 | accuracy REAL, |
| 1064 | sharing INTEGER NOT NULL DEFAULT 0, |
| 1065 | updated_at TEXT |
| 1066 | ) |
| 1067 | """) |
| 1068 | |
| 1069 | |
| 1070 | # ---------------- Profiler feature (FULLY encrypted) ---------------- |
| 1071 | cur.execute(""" |
| 1072 | CREATE TABLE IF NOT EXISTS profiler_entries ( |
| 1073 | id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 1074 | owner TEXT NOT NULL, |
| 1075 | first_enc TEXT NOT NULL, |
| 1076 | last_enc TEXT NOT NULL, |
| 1077 | info_enc TEXT NOT NULL, |
| 1078 | optional_enc TEXT, |
| 1079 | created_at TEXT NOT NULL, |
| 1080 | updated_at TEXT NOT NULL |
| 1081 | ) |
| 1082 | """) |
| 1083 | # profiler_entries schema migration (optional fields stored encrypted as JSON) |
| 1084 | pcols = [r[1] for r in cur.execute("PRAGMA table_info(profiler_entries)").fetchall()] |
| 1085 | if "optional_enc" not in pcols: |
| 1086 | try: |
| 1087 | cur.execute("ALTER TABLE profiler_entries ADD COLUMN optional_enc TEXT") |
| 1088 | except Exception: |
| 1089 | pass |
| 1090 | if "bounty_price" not in pcols: |
| 1091 | try: |
| 1092 | cur.execute("ALTER TABLE profiler_entries ADD COLUMN bounty_price REAL") |
| 1093 | except Exception: |
| 1094 | pass |
| 1095 | if "bounty_set_by" not in pcols: |
no test coverage detected