refactor(db): drop cleartext site/username column refs (columns removed)

User dropped the now-empty cleartext `site` + `username` columns after the
§1.3 migration completed. Removed every reference so the code matches the
schema: GET emission, POST/PUT/bulk INSERT/UPDATE (columns + params + binds).
title/tags cleartext columns still exist and are untouched.

decryptEntryMeta defaults e[f]='' for rows without *_enc (notes w/o site),
since GET no longer returns the dropped columns.

ponytail: contract phase of expand→migrate→contract; only safe because the
migration is proven complete (0 cleartext, both accounts).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-09 21:25:35 +01:00
parent 6379772305
commit bcdd2f44bc
2 changed files with 10 additions and 20 deletions
+2
View File
@@ -1482,6 +1482,8 @@ async function decryptEntryMeta(list) {
if (enc && iv) {
const v = await decryptPwd(enc, iv);
if (v !== '[ERROR]') e[f] = v;
} else if (e[f] == null) {
e[f] = ''; // site/username cleartext columns dropped → default
}
}
}