/** * Wrapper function to drop triggers. * * @param string $tableName * the specific table requiring a rebuild; or NULL to rebuild all tables. */ public static function dropTriggers($tableName = NULL) { $info = array(); $logging = new CRM_Logging_Schema(); $logging->triggerInfo($info, $tableName); // drop all existing triggers on all tables $logging->dropTriggers($tableName); }
static function triggerRebuild($tableName = NULL) { $info = array(); $logging = new CRM_Logging_Schema(); $logging->triggerInfo($info, $tableName); CRM_Core_I18n_Schema::triggerInfo($info, $tableName); CRM_Utils_Hook::triggerInfo($info, $tableName); // drop all existing triggers on all tables $logging->dropTriggers($tableName); // now create the set of new triggers self::createTriggers($info); }