| 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 | <html> |
| 16 | <type>Number</type> |
| 17 | </html> |
| 18 | <add>3.1</add> |
| 19 | </field> |
| 20 | <primaryKey> |
| 21 | <name>id</name> |
| 22 | <autoincrement>true</autoincrement> |
| 23 | </primaryKey> |
| 24 | <field> |
| 25 | <name>user_id</name> |
| 26 | <title>Contact ID</title> |
| 27 | <type>int unsigned</type> |
| 28 | <comment>FK to civicrm_contact (could be null for anon user)</comment> |
| 29 | <add>3.1</add> |
| 30 | </field> |
| 31 | <field> |
| 32 | <name>contact_id</name> |
| 33 | <title>Contact ID</title> |
| 34 | <type>int unsigned</type> |
| 35 | <required>true</required> |
| 36 | <comment>FK to civicrm_contact</comment> |
| 37 | <html> |
| 38 | <label>Contact</label> |
| 39 | </html> |
| 40 | <add>3.1</add> |
| 41 | </field> |
| 42 | <foreignKey> |
| 43 | <name>contact_id</name> |
| 44 | <table>civicrm_contact</table> |
| 45 | <key>id</key> |
| 46 | <add>3.1</add> |
| 47 | <drop>5.31</drop> |
| 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> |