From 0bf37cef0c98ca677096ad7e1e149228e0968b2e Mon Sep 17 00:00:00 2001 From: lorentz Date: Wed, 15 Jul 2026 10:23:55 -0400 Subject: [PATCH] =?UTF-8?q?feat(16-02):=20add=20migration=20099=20?= =?UTF-8?q?=E2=80=94=20indicators.metadata=20JSONB=20(D-07)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Nullable JSONB column, no backfill needed (no rows exist yet) - Applied to the running dev DB (docker exec against pulse-postgres); Postgres init only runs migrations on first volume boot --- migrations/099_indicators_metadata.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 migrations/099_indicators_metadata.sql diff --git a/migrations/099_indicators_metadata.sql b/migrations/099_indicators_metadata.sql new file mode 100644 index 0000000..884be84 --- /dev/null +++ b/migrations/099_indicators_metadata.sql @@ -0,0 +1,16 @@ +-- ============================================================================= +-- indicators.metadata JSONB (Phase 16 — D-07) +-- ============================================================================= +-- Lets an attachment-hash indicator carry filename/content-type/size, or a +-- URL indicator carry which message part it came from, without duplicating +-- that context into the parent messages row. +-- +-- Nullable, no default — existing rows (there are none yet for this table) +-- are unaffected; this is a pure additive change. +-- ============================================================================= + +ALTER TABLE indicators + ADD COLUMN IF NOT EXISTS metadata JSONB; + +COMMENT ON COLUMN indicators.metadata IS + 'Per-indicator context (e.g. attachment filename/content-type/size for attachment-hash indicators, or source message part for URL indicators). Nullable — no backfill required.';