Add unique index to course memberships