-- Migration: Add privacy settings to users table
-- Date: 2026-01-28
-- Description: Adds fields to control visibility of phone and email in user profile

-- Add privacy columns to users table
ALTER TABLE users ADD COLUMN IF NOT EXISTS privacy_show_phone BOOLEAN DEFAULT TRUE;
ALTER TABLE users ADD COLUMN IF NOT EXISTS privacy_show_email BOOLEAN DEFAULT TRUE;

-- Comment for documentation
COMMENT ON COLUMN users.privacy_show_phone IS 'If FALSE, phone number is hidden from other users';
COMMENT ON COLUMN users.privacy_show_email IS 'If FALSE, email is hidden from other users';

-- Grant permissions
GRANT SELECT, UPDATE ON users TO nordabiz_app;
