Convert foreign keys to indexes.