Guest User

Untitled

a guest
Jun 23rd, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2. /**
  3. * Add index to custom field. This method will not work as expected.
  4. * File Location: custom/Extension/modules/Contacts/Ext/Vardefs/index_external_id.php
  5. *
  6. */
  7. $dictionary['Contact']['indices'][] = array(
  8. 'name' => 'idx_external_id_c',
  9. 'type' => 'index',
  10. 'fields' => array(
  11. 'external_id_c'
  12. )
  13. );
  14.  
  15. /**
  16. * After running repair and rebuild we get the following SQL query to run
  17. * based on the new vardef
  18. */
  19. /* INDEXES */
  20. /*MISSING INDEX IN DATABASE - idx_external_id_c - index ROW */
  21.  
  22. // ALTER TABLE contacts ADD INDEX idx_external_id_c (external_id_c);
Add Comment
Please, Sign In to add comment