Marc Salo

Indexing Custom tables in database

Discussion created by Marc Salo on Feb 15, 2017

I have a custom module "PC_Order" and I want to add an index on a field in the database table "pc_order_cstm".


Doing it through SQL would look like


  1. ALTER TABLE pc_order_cstm ADD INDEX idx_oracleid_cstm (oracleid_c);  


I'm not sure how to do this through Sugar. I know how to add custom indexes on stock fields stored in the module's base table, but I don't know how to index fields in the _cstm table. 


Any help would be appreciated.