0002_ai_mentor_prefs.sql adds ai_mentor_prefs(user_id, course_id, off). upgradeAiData copies v1 config_json.mentorOff toggles into it once (marked ai_data_v11 in schema_migrations); the settings repo awaits the upgrade before first use and aiFeature starts it at construction. Co-Authored-By: Claude Opus 5.5 <[email protected]>