mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 10:38:06 +02:00
Add redundant contact_id field for search kit/form builder; add index on category field...
This commit is contained in:
parent
9fee48603b
commit
7b611c343f
7 changed files with 113 additions and 29 deletions
|
@ -54,13 +54,13 @@ class Sync extends \Civi\Api4\Generic\AbstractAction {
|
|||
Civi::log()->debug('', ['=' => 'pop']);
|
||||
}
|
||||
|
||||
Civi::log()->debug('Resetting table', ['=' => 'timed']);
|
||||
Civi::log()->debug('Resetting table', ['=' => 'start,timed']);
|
||||
// clear out temp space.
|
||||
CRM_Core_DAO::executeQuery("UPDATE civicrm_contact_category SET next_category = 0;")->free();
|
||||
// ensure we have all our contacts covered.
|
||||
CRM_Core_DAO::executeQuery(<<<SQL
|
||||
INSERT IGNORE INTO civicrm_contact_category
|
||||
SELECT id, 0 as category, 0 next_category
|
||||
SELECT id, id contact_id, 0 as category, 0 next_category
|
||||
FROM civicrm_contact
|
||||
SQL)->free();
|
||||
Civi::log()->debug('', ['=' => 'pop']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue