ALTER TABLE orders ADD COLUMN customer_phone TEXT NOT NULL DEFAULT ''; UPDATE orders SET customer_phone = COALESCE(contacts->>'phone', '');