CREATE TABLE user_preferences ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), user_id UUID NOT NULL, writing_goal_daily INTEGER DEFAULT 1000, preferred_theme TEXT DEFAULT 'dark', preferred_ai_model TEXT DEFAULT 'gpt-4', auto_save_interval INTEGER DEFAULT 30, editor_font_size INTEGER DEFAULT 16, editor_font_family TEXT DEFAULT 'Georgia', show_word_count BOOLEAN DEFAULT true, show_writing_stats BOOLEAN DEFAULT true, enable_ai_suggestions BOOLEAN DEFAULT true, created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc', now()), updated_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc', now()) );