removes `KEY` and adds indexes