Merge pull request #19086 from agileware/CIVICRM-1617
[civicrm-core.git] / xml / schema / Case / CaseContact.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <table>
3 <base>CRM/Case</base>
4 <class>CaseContact</class>
5 <name>civicrm_case_contact</name>
6 <comment>Joining table for case-contact associations.</comment>
7 <add>2.1</add>
8 <log>true</log>
9 <component>CiviCase</component>
10 <field>
11 <name>id</name>
12 <title>Case Contact ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Unique case-contact association id</comment>
16 <add>2.1</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>case_id</name>
24 <title>Case</title>
25 <type>int unsigned</type>
26 <required>true</required>
27 <comment>Case ID of case-contact association.</comment>
28 <add>2.1</add>
29 </field>
30 <foreignKey>
31 <name>case_id</name>
32 <table>civicrm_case</table>
33 <key>id</key>
34 <add>2.1</add>
35 <onDelete>CASCADE</onDelete>
36 </foreignKey>
37 <field>
38 <name>contact_id</name>
39 <title>Contact ID</title>
40 <type>int unsigned</type>
41 <required>true</required>
42 <comment>Contact ID of contact record given case belongs to.</comment>
43 <html>
44 <type>EntityRef</type>
45 </html>
46 <add>2.1</add>
47 </field>
48 <foreignKey>
49 <name>contact_id</name>
50 <table>civicrm_contact</table>
51 <key>id</key>
52 <add>2.1</add>
53 <onDelete>CASCADE</onDelete>
54 </foreignKey>
55 <index>
56 <name>UI_case_contact_id</name>
57 <fieldName>case_id</fieldName>
58 <fieldName>contact_id</fieldName>
59 <unique>true</unique>
60 <add>2.1</add>
61 </index>
62 </table>