| 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 | <pseudoconstant> |
| 54 | <callback>CRM_ACL_BAO_ACL::operation</callback> |
| 55 | </pseudoconstant> |
| 56 | <add>1.6</add> |
| 57 | <html> |
| 58 | <type>Select</type> |
| 59 | </html> |
| 60 | </field> |
| 61 | <index> |
| 62 | <name>UI_user_contact_operation</name> |
| 63 | <fieldName>user_id</fieldName> |
| 64 | <fieldName>contact_id</fieldName> |
| 65 | <fieldName>operation</fieldName> |
| 66 | <unique>true</unique> |
| 67 | <add>3.1</add> |
| 68 | </index> |
| 69 | </table> |