Merge pull request #1113 from deepak-srivastava/reportsapi
[civicrm-core.git] / xml / schema / Contact / GroupNesting.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>GroupNesting</class>
6 <name>civicrm_group_nesting</name>
7 <comment>Provide parent-child relationships for groups</comment>
8 <add>2.0</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Relationship ID</comment>
15 <add>2.0</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>child_group_id</name>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>ID of the child group</comment>
26 <add>2.0</add>
27 </field>
28 <foreignKey>
29 <name>child_group_id</name>
30 <table>civicrm_group</table>
31 <key>id</key>
32 <onDelete>CASCADE</onDelete>
33 <add>2.0</add>
34 </foreignKey>
35 <field>
36 <name>parent_group_id</name>
37 <type>int unsigned</type>
38 <required>true</required>
39 <comment>ID of the parent group</comment>
40 <add>2.0</add>
41 </field>
42 <foreignKey>
43 <name>parent_group_id</name>
44 <table>civicrm_group</table>
45 <key>id</key>
46 <onDelete>CASCADE</onDelete>
47 <add>2.0</add>
48 </foreignKey>
49 </table>