Merge pull request #17309 from colemanw/MailingAB
[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 <title>Entity Role</title>
13 <required>true</required>
14 <comment>Unique table ID</comment>
15 <add>1.6</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>acl_role_id</name>
23 <title>ACL Role ID</title>
24 <type>int unsigned</type>
25 <required>true</required>
26 <comment>Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)</comment>
27 <add>1.6</add>
28 </field>
29 <field>
30 <name>entity_table</name>
31 <title>Entity Table</title>
32 <type>varchar</type>
33 <length>64</length>
34 <required>true</required>
35 <comment>Table of the object joined to the ACL Role (Contact or Group)</comment>
36 <add>1.6</add>
37 </field>
38 <field>
39 <name>entity_id</name>
40 <title>ACL Entity ID</title>
41 <type>int unsigned</type>
42 <required>true</required>
43 <comment>ID of the group/contact object being joined</comment>
44 <add>1.6</add>
45 </field>
46 <dynamicForeignKey>
47 <idColumn>entity_id</idColumn>
48 <typeColumn>entity_table</typeColumn>
49 <add>1.6</add>
50 </dynamicForeignKey>
51 <field>
52 <name>is_active</name>
53 <title>ACL Entity Role is Active</title>
54 <type>boolean</type>
55 <comment>Is this property active?</comment>
56 <add>1.6</add>
57 </field>
58 <index>
59 <name>index_role</name>
60 <fieldName>acl_role_id</fieldName>
61 <add>1.6</add>
62 </index>
63 <index>
64 <name>index_entity</name>
65 <fieldName>entity_table</fieldName>
66 <fieldName>entity_id</fieldName>
67 <add>1.6</add>
68 </index>
69 </table>