Answers.Body: <p>Triggers are stored in the <code>information_schema</code>, a virtual database provided by MySQL.  <a href="https://stackoverflow.com/a/47364/2832108">This StackOverflow answer</a> gives a pretty good overview.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T02:55:05.777Z
Answers.Text: Yea, that's where mysql stores the info but when you use the hook_civicrm_triggerinfo civi must store that info somewhere.  So in this case, the trigger doesn't exists now.  The rebuild indexes dropped them all, but it tries to create one with the 2 i's.  I'm pretty sure that trigger got created by summary reports and therefore has an entry where ever civi stores the info.  Since mysql doesn't allow multiple triggers with the same action on the same table civi has to combine any it has in core code with any the user may have created, hence the need for the hook.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T03:16:11.387Z
Answers.Text: Summary reports is an extension isn't it? It probably calls that hook & has a typo in it
Answers.UserDisplayName: user4278
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T02:42:38.317Z
Answers.LastActivityDate: 2018-06-20T02:42:38.317Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I have a rebuild trigger action that is failing.  It is trying to create a trigger on civicrm_contributiion_recur.  Clearly it has 2 i's and shouldn't.  There is or was a trigger on the table without the extra i, so I figure it got stored in the db incorrectly.  I went off in search of just where that stuff is stored but alas haven't found where.</p>
  
  <p>So when you use hook_civicrm_triggerInfo to create a custom trigger where is that info stored?</p>
  
  <p>Or when civi does an index rebuild how does it collect the list of tables and the bodies of the triggers?  It needs to do this so it can combine any triggers civi core has with any custom triggers an extension or customization has added.</p>
  
Tags: <hooks>
Title: Which table is used for hook_civicrm_triggerInfo?
ThreadText: # Which table is used for hook_civicrm_triggerInfo?
  
  (Asked by: username_0 on 2018-06-20)
  
  I have a rebuild trigger action that is failing. It is trying to create a trigger on civicrm\_contributiion\_recur. Clearly it has 2 i's and shouldn't. There is or was a trigger on the table without the extra i, so I figure it got stored in the db incorrectly. I went off in search of just where that stuff is stored but alas haven't found where.
  
  So when you use hook\_civicrm\_triggerInfo to create a custom trigger where is that info stored?
  
  Or when civi does an index rebuild how does it collect the list of tables and the bodies of the triggers? It needs to do this so it can combine any triggers civi core has with any custom triggers an extension or customization has added.
  
  **Tags:** hooks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-06-20. Score: 1
  
  Triggers are stored in the `information_schema`, a virtual database provided by MySQL. [This StackOverflow answer](https://stackoverflow.com/a/47364/2832108) gives a pretty good overview.
  
  > **Comments:**
  > **username_0**: Yea, that's where mysql stores the info but when you use the hook_civicrm_triggerinfo civi must store that info somewhere.  So in this case, the trigger doesn't exists now.  The rebuild indexes dropped them all, but it tries to create one with the 2 i's.  I'm pretty sure that trigger got created by summary reports and therefore has an entry where ever civi stores the info.  Since mysql doesn't allow multiple triggers with the same action on the same table civi has to combine any it has in core code with any the user may have created, hence the need for the hook.  
  > **username_2**: Summary reports is an extension isn't it? It probably calls that hook & has a typo in it  
  
  ---
  
  