I think a composite index on `(course_id, module_id)` (in the migration) might be more useful than putting indexes on the individual columns.