What is the best practice to add a database index to a custom table?

I want to add indexes to a custom table (to speed up reports) but is there an upgrade-safe (and rebuiild safe!) way to do this?

i.e. is there a way to add a php file to define the index?