cln/db
wqxoxo f318c13bf5 db: add STRICT tables with migration for old databases
Enables STRICT tables in developer mode, but old databases (~2019) may
have BLOB values in TEXT columns. Migration converts BLOB faildetail
to TEXT with UTF-8 validation, NULLs invalid data.

STRICT is only applied to fresh databases; existing databases being
upgraded skip STRICT to avoid type affinity issues with legacy data.

Also adds security pragmas in developer mode: trusted_schema=OFF,
cell_size_check=ON.

Fixes #5390.

Changelog-Added: Database: STRICT tables and security pragmas in developer mode
Changelog-Fixed: Database migration for old BLOB-typed faildetail values
2026-02-23 15:55:55 +10:30
..
bindings.c global: remove unnecessary includes from C files. 2025-10-23 06:44:04 +10:30
bindings.h db: helper for binding/reading bitcoin_outpoint. 2025-08-19 13:37:50 +09:30
common.h db: add STRICT tables with migration for old databases 2026-02-23 15:55:55 +10:30
db_postgres.c db: support mode where we don't want to create the db. 2025-08-19 13:37:50 +09:30
db_sqlite3.c db: add STRICT tables with migration for old databases 2026-02-23 15:55:55 +10:30
exec.c db: don't start transactions unless we really need to. 2025-11-20 16:30:50 +10:30
exec.h db: don't start transactions unless we really need to. 2025-11-20 16:30:50 +10:30
Makefile database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
utils.c db: add STRICT tables with migration for old databases 2026-02-23 15:55:55 +10:30
utils.h db: support mode where we don't want to create the db. 2025-08-19 13:37:50 +09:30