Using the DBUtil class, you can check if a table or field exists before creating/dropping to avoid errors. Is there any way to do this for table indexes? There is no index_exists() function on the DBUtil class page. I also looked through the class file itself and didn't find anything similar.
If anyone has any insight if this can even be done, it would be greatly appreciated. Thanks in advance.
Thanks for getting back to me. I never got notified on your last message, so I'm only seeing this now.
The list_indexes() method seems to be specific to MongoDB which I am not using. I did find a workaround to this by using try/catch code when creating or deleting indexes. This way they don't toss exceptions and kill my scripts.
If you're aware of anything that will work with MySQL, please keep me posted.
As always, thanks for your super quick replies. In regards to this, I cannot call the list_indexes() method whatsoever. When I do, FuelPHP tosses an exception at me:
ErrorException [ Fatal Error ]:
Call to undefined method Fuel\Core\DB::list_indexes()