Fix for PROV-477

Use shorter indexes to get around MySQLs hardcoded max key length restriction in 5.6.

I don't know if it's a good idea to re-create all those indexes for all existing setups, which is why I'm opening a pull request for review instead of simply merging it.