[wip] cli capability parity
Some checks failed
CI / Rustfmt (push) Successful in 23s
CI / Cargo Audit & Deny (push) Successful in 30s
CI / Web Blocking Checks (push) Successful in 48s
CI / Security Blocking Checks (push) Successful in 8s
CI / Clippy (push) Failing after 1m55s
CI / Web Advisory Checks (push) Successful in 35s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Successful in 8m5s

This commit is contained in:
2026-03-06 16:58:50 -06:00
parent 48b6ca6bd7
commit 87d830f952
94 changed files with 3694 additions and 734 deletions

View File

@@ -0,0 +1,17 @@
-- Migration: Convert key.value from TEXT to JSONB
--
-- This allows keys to store structured data (objects, arrays, numbers, booleans)
-- in addition to plain strings. Existing string values are wrapped in JSON string
-- literals so they remain valid and accessible.
--
-- Before: value TEXT NOT NULL (e.g., 'my-secret-token')
-- After: value JSONB NOT NULL (e.g., '"my-secret-token"' or '{"user":"admin","pass":"s3cret"}')
-- Step 1: Convert existing TEXT values to JSONB.
-- to_jsonb(text) wraps a plain string as a JSON string literal, e.g.:
-- 'hello' -> '"hello"'
-- This preserves all existing values perfectly — encrypted values (base64 strings)
-- become JSON strings, and plain text values become JSON strings.
ALTER TABLE key
ALTER COLUMN value TYPE JSONB
USING to_jsonb(value);