-- Migration: Update UUID tables to use UUID v7
-- Description: Updates default values for notifications, tickets, job_payments to use uuid_generate_v7()
-- Requires: 021_create_uuid_v7_function.sql (must run first)

-- Update notifications table to use UUID v7
ALTER TABLE notifications ALTER COLUMN id SET DEFAULT uuid_generate_v7();

-- Update tickets table to use UUID v7
ALTER TABLE tickets ALTER COLUMN id SET DEFAULT uuid_generate_v7();

-- Update ticket_messages table to use UUID v7
ALTER TABLE ticket_messages ALTER COLUMN id SET DEFAULT uuid_generate_v7();

-- Update job_payments table to use UUID v7
ALTER TABLE job_payments ALTER COLUMN id SET DEFAULT uuid_generate_v7();

-- Comments
COMMENT ON TABLE notifications IS 'User notifications (UUID v7 IDs)';
COMMENT ON TABLE tickets IS 'Support tickets (UUID v7 IDs)';
COMMENT ON TABLE job_payments IS 'Payment records for job postings (UUID v7 IDs)';
