Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-11-03-17-29-16
[civicrm-core.git] / xml / schema / ACL / EntityRole.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/ACL</base>
5 <class>EntityRole</class>
6 <name>civicrm_acl_entity_role</name>
7 <comment>Join table for Contacts and Groups to ACL Roles</comment>
8 <add>1.6</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Unique table ID</comment>
14 <add>1.6</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>acl_role_id</name>
22 <type>int unsigned</type>
23 <required>true</required>
24 <comment>Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)</comment>
25 <add>1.6</add>
26 </field>
27 <field>
28 <name>entity_table</name>
29 <type>varchar</type>
30 <length>64</length>
31 <required>true</required>
32 <comment>Table of the object joined to the ACL Role (Contact or Group)</comment>
33 <add>1.6</add>
34 </field>
35 <field>
36 <name>entity_id</name>
37 <type>int unsigned</type>
38 <required>true</required>
39 <comment>ID of the group/contact object being joined</comment>
40 <add>1.6</add>
41 </field>
42 <dynamicForeignKey>
43 <idColumn>entity_id</idColumn>
44 <typeColumn>entity_table</typeColumn>
45 <add>1.6</add>
46 </dynamicForeignKey>
47 <field>
48 <name>is_active</name>
49 <type>boolean</type>
50 <comment>Is this property active?</comment>
51 <add>1.6</add>
52 </field>
53 <index>
54 <name>index_role</name>
55 <fieldName>acl_role_id</fieldName>
56 <add>1.6</add>
57 </index>
58 <index>
59 <name>index_entity</name>
60 <fieldName>entity_table</fieldName>
61 <fieldName>entity_id</fieldName>
62 <add>1.6</add>
63 </index>
64 </table>