Add redundant contact_id field for search kit/form builder; add index on category field...

This commit is contained in:
Rich Lott / Artful Robot 2024-02-28 17:18:46 +00:00
parent 9fee48603b
commit 7b611c343f
7 changed files with 113 additions and 29 deletions

View file

@ -13,16 +13,26 @@
<required>true</required>
<comment>Unique ID, corresponds to contact id</comment>
<html>
<type>EntityRef</type>
<label>Contact</label>
<type>Number</type>
</html>
</field>
<primaryKey>
<name>id</name>
<autoincrement>true</autoincrement>
</primaryKey>
<field>
<name>contact_id</name>
<type>int unsigned</type>
<required>true</required>
<comment>Same as id but for FormBuilder</comment>
<html>
<type>EntityRef</type>
<label>Contact</label>
</html>
</field>
<foreignKey>
<name>id</name>
<name>contact_id</name>
<table>civicrm_contact</table>
<key>id</key>
<onDelete>CASCADE</onDelete>
@ -30,7 +40,7 @@
<field>
<name>category</name>
<type>int unsigned</type>
<type>int unsigned</type>
<required>true</required>
<default>0</default>
<pseudoconstant>
@ -40,10 +50,14 @@
<type>Select</type>
</html>
</field>
<index>
<name>index_category</name>
<fieldName>category</fieldName>
</index>
<field>
<name>next_category</name>
<type>int unsigned</type>
<type>int unsigned</type>
<required>true</required>
<default>0</default>
<pseudoconstant>