Ian province abbreviation patch - issue 724
[civicrm-core.git] / xml / schema / Activity / ActivityTarget.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <table>
3 <base>CRM/Activity</base>
4 <class>ActivityTarget</class>
5 <name>civicrm_activity_target</name>
6 <comment>Activity targets</comment>
7 <add>2.0</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <title>Activity Target ID</title>
13 <required>true</required>
14 <comment>Activity target 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>activity_id</name>
23 <type>int unsigned</type>
24 <title>Activity ID</title>
25 <required>true</required>
26 <comment>Foreign key to the activity for this target.</comment>
27 <add>2.0</add>
28 </field>
29 <foreignKey>
30 <name>activity_id</name>
31 <table>civicrm_activity</table>
32 <key>id</key>
33 <add>2.0</add>
34 <onDelete>CASCADE</onDelete>
35 </foreignKey>
36
37 <field>
38 <name>target_contact_id</name>
39 <title>Contact ID (match to contact)</title>
40 <import>true</import>
41 <type>int unsigned</type>
42 <required>true</required>
43 <comment>Foreign key to the contact for this target.</comment>
44 <add>2.0</add>
45 </field>
46 <foreignKey>
47 <name>target_contact_id</name>
48 <table>civicrm_contact</table>
49 <key>id</key>
50 <add>2.0</add>
51 <onDelete>CASCADE</onDelete>
52 </foreignKey>
53
54 <index>
55 <name>UI_activity_target_contact_id</name>
56 <fieldName>target_contact_id</fieldName>
57 <fieldName>activity_id</fieldName>
58 <unique>true</unique>
59 <add>2.0</add>
60 </index>
61 </table>