Merge pull request #1333 from eileenmcnaughton/CRM-13155
[civicrm-core.git] / xml / schema / Contact / GroupContactCache.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>GroupContactCache</class>
6 <name>civicrm_group_contact_cache</name>
7 <comment>Join table cache for 'static' groups.</comment>
8 <add>2.1</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>primary key</comment>
14 <add>2.1</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>group_id</name>
22 <type>int unsigned</type>
23 <required>true</required>
24 <comment>FK to civicrm_group</comment>
25 <add>2.1</add>
26 <pseudoconstant>
27 <table>civicrm_group</table>
28 <keyColumn>id</keyColumn>
29 <labelColumn>title</labelColumn>
30 </pseudoconstant>
31 </field>
32 <foreignKey>
33 <name>group_id</name>
34 <table>civicrm_group</table>
35 <key>id</key>
36 <add>2.1</add>
37 <onDelete>CASCADE</onDelete>
38 </foreignKey>
39 <field>
40 <name>contact_id</name>
41 <type>int unsigned</type>
42 <required>true</required>
43 <comment>FK to civicrm_contact</comment>
44 <add>2.1</add>
45 </field>
46 <foreignKey>
47 <name>contact_id</name>
48 <table>civicrm_contact</table>
49 <key>id</key>
50 <add>2.1</add>
51 <onDelete>CASCADE</onDelete>
52 </foreignKey>
53 <index>
54 <name>UI_contact_group</name>
55 <fieldName>contact_id</fieldName>
56 <fieldName>group_id</fieldName>
57 <unique>true</unique>
58 <add>2.1</add>
59 </index>
60 </table>