Added indexExists and addIndex to database.php
Updates to compliment 1ea4d0734483e1e92533d5beacc0a6a3f31d54b6