-- Migration 006: Independent encrypted data for sender and recipient
--
-- Previously: one shared encrypted_image/encrypted_message used by both parties.
-- Now: each party has their own independently encrypted copy.
--   - recipient: encrypted_image / encrypted_message (existing columns, unchanged)
--   - sender:    sender_encrypted_image / sender_encrypted_message (new columns)
--
-- Naming convention:
--   recipient columns: encrypted_image, encryption_iv, encryption_tag, encrypted_message, message_iv, message_tag
--   sender columns:    sender_encrypted_image, sender_encryption_iv, sender_encryption_tag,
--                      sender_encrypted_message, sender_message_iv, sender_message_tag

ALTER TABLE customers
  ADD COLUMN IF NOT EXISTS sender_encrypted_image    TEXT,
  ADD COLUMN IF NOT EXISTS sender_encryption_iv      TEXT,
  ADD COLUMN IF NOT EXISTS sender_encryption_tag     TEXT,
  ADD COLUMN IF NOT EXISTS sender_encrypted_message  TEXT,
  ADD COLUMN IF NOT EXISTS sender_message_iv         TEXT,
  ADD COLUMN IF NOT EXISTS sender_message_tag        TEXT;
