Merge pull request #18880 from vingle/master
[civicrm-core.git] / xml / schema / Contact / ACLContactCache.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>ACLContactCache</class>
6 <name>civicrm_acl_contact_cache</name>
7 <comment>Join table cache for contacts that a user has permission on.</comment>
8 <add>3.1</add>
9 <field>
10 <name>id</name>
11 <title>ACL Contact Cache ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>primary key</comment>
15 <add>3.1</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>user_id</name>
23 <title>Contact ID</title>
24 <type>int unsigned</type>
25 <comment>FK to civicrm_contact (could be null for anon user)</comment>
26 <add>3.1</add>
27 </field>
28 <field>
29 <name>contact_id</name>
30 <title>Contact ID</title>
31 <type>int unsigned</type>
32 <required>true</required>
33 <comment>FK to civicrm_contact</comment>
34 <add>3.1</add>
35 </field>
36 <foreignKey>
37 <name>contact_id</name>
38 <table>civicrm_contact</table>
39 <key>id</key>
40 <add>3.1</add>
41 <drop>5.31</drop>
42 <onDelete>CASCADE</onDelete>
43 </foreignKey>
44 <field>
45 <name>operation</name>
46 <title>Operation</title>
47 <type>varchar</type>
48 <length>8</length>
49 <required>true</required>
50 <comment>What operation does this user have permission on?</comment>
51 <pseudoconstant>
52 <callback>CRM_ACL_BAO_ACL::operation</callback>
53 </pseudoconstant>
54 <add>1.6</add>
55 <html>
56 <type>Select</type>
57 </html>
58 </field>
59 <index>
60 <name>UI_user_contact_operation</name>
61 <fieldName>user_id</fieldName>
62 <fieldName>contact_id</fieldName>
63 <fieldName>operation</fieldName>
64 <unique>true</unique>
65 <add>3.1</add>
66 </index>
67 </table>