CRM-14181 fixes - migrate enums to varchar in schema for all tables
[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 <type>int unsigned</type>
12 <required>true</required>
13 <comment>primary key</comment>
14 <add>3.1</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>user_id</name>
22 <type>int unsigned</type>
23 <comment>FK to civicrm_contact (could be null for anon user)</comment>
24 <add>3.1</add>
25 </field>
26 <foreignKey>
27 <name>user_id</name>
28 <table>civicrm_contact</table>
29 <key>id</key>
30 <add>3.1</add>
31 <onDelete>CASCADE</onDelete>
32 </foreignKey>
33 <field>
34 <name>contact_id</name>
35 <type>int unsigned</type>
36 <required>true</required>
37 <comment>FK to civicrm_contact</comment>
38 <add>3.1</add>
39 </field>
40 <foreignKey>
41 <name>contact_id</name>
42 <table>civicrm_contact</table>
43 <key>id</key>
44 <add>3.1</add>
45 <onDelete>CASCADE</onDelete>
46 </foreignKey>
47 <field>
48 <name>operation</name>
49 <type>varchar</type>
50 <length>8</length>
51 <required>true</required>
52 <comment>What operation does this user have permission on?</comment>
53 <add>1.6</add>
54 <html>
55 <type>Select</type>
56 </html>
57 </field>
58 <index>
59 <name>UI_user_contact_operation</name>
60 <fieldName>user_id</fieldName>
61 <fieldName>contact_id</fieldName>
62 <fieldName>operation</fieldName>
63 <unique>true</unique>
64 <add>3.1</add>
65 </index>
66 </table>