-- Migration 009: Blockchain timestamping
--
-- Records the Polygon blockchain transaction hash when a postcard is sealed.
-- This creates a permanent, tamper-proof public record for the 50-year delivery promise.
--
-- blockchain_tx:        Polygon transaction hash (0x...) — verifiable on Polygonscan
-- blockchain_sealed_at: When the seal transaction was confirmed on-chain
-- blockchain_error:     Last error if sealing failed (for retry logic)

ALTER TABLE customers
  ADD COLUMN IF NOT EXISTS blockchain_tx         TEXT,
  ADD COLUMN IF NOT EXISTS blockchain_sealed_at  TIMESTAMPTZ,
  ADD COLUMN IF NOT EXISTS blockchain_error      TEXT;
