Database migration for enforcing course uniqueness