Merge pull request #8861 from danbrellis/patch-1
[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 <foreignKey>
29 <name>user_id</name>
30 <table>civicrm_contact</table>
31 <key>id</key>
32 <add>3.1</add>
33 <onDelete>CASCADE</onDelete>
34 </foreignKey>
35 <field>
36 <name>contact_id</name>
37 <title>Contact ID</title>
38 <type>int unsigned</type>
39 <required>true</required>
40 <comment>FK to civicrm_contact</comment>
41 <add>3.1</add>
42 </field>
43 <foreignKey>
44 <name>contact_id</name>
45 <table>civicrm_contact</table>
46 <key>id</key>
47 <add>3.1</add>
48 <onDelete>CASCADE</onDelete>
49 </foreignKey>
50 <field>
51 <name>operation</name>
52 <title>Operation</title>
53 <type>varchar</type>
54 <length>8</length>
55 <required>true</required>
56 <comment>What operation does this user have permission on?</comment>
57 <pseudoconstant>
58 <callback>CRM_ACL_BAO_ACL::operation</callback>
59 </pseudoconstant>
60 <add>1.6</add>
61 <html>
62 <type>Select</type>
63 </html>
64 </field>
65 <index>
66 <name>UI_user_contact_operation</name>
67 <fieldName>user_id</fieldName>
68 <fieldName>contact_id</fieldName>
69 <fieldName>operation</fieldName>
70 <unique>true</unique>
71 <add>3.1</add>
72 </index>
73 </table>