Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <table> | |
3 | <base>CRM/Activity</base> | |
4 | <class>ActivityAssignment</class> | |
5 | <name>civicrm_activity_assignment</name> | |
6 | <comment>Activity assignments</comment> | |
7 | <add>1.8</add> | |
8 | <log>true</log> | |
9 | <field> | |
10 | <name>id</name> | |
11 | <type>int unsigned</type> | |
12 | <title>Activity Assignment ID</title> | |
13 | <required>true</required> | |
14 | <comment>Activity assignment id</comment> | |
15 | <add>1.8</add> | |
16 | </field> | |
17 | <primaryKey> | |
18 | <name>id</name> | |
19 | <autoincrement>true</autoincrement> | |
20 | </primaryKey> | |
21 | ||
3c7d2158 | 22 | <field> |
6a488035 TO |
23 | <name>activity_entity_table</name> |
24 | <type>varchar</type> | |
3c7d2158 | 25 | <length>64</length> |
6a488035 TO |
26 | <required>true</required> |
27 | <comment>Name of table where item being referenced is stored (activity, phonecall or meeting).</comment> | |
28 | <add>1.8</add> | |
29 | <drop>2.0</drop> | |
29e8791c | 30 | </field> |
6a488035 TO |
31 | |
32 | <field> | |
33 | <name>activity_entity_id</name> | |
34 | <type>int unsigned</type> | |
35 | <required>true</required> | |
36 | <comment>Entity (activity, phonecall or meeting) id for which the assigment is created</comment> | |
37 | <add>1.8</add> | |
3c7d2158 | 38 | <drop>2.0</drop> |
6a488035 TO |
39 | </field> |
40 | ||
71e5aa5c ARW |
41 | <dynamicForeignKey> |
42 | <idColumn>activity_entity_id</idColumn> | |
43 | <typeColumn>activity_entity_table</typeColumn> | |
44 | <add>1.8</add> | |
3c7d2158 | 45 | <drop>2.0</drop> |
71e5aa5c ARW |
46 | </dynamicForeignKey> |
47 | ||
3c7d2158 | 48 | <field> |
6a488035 TO |
49 | <name>target_entity_table</name> |
50 | <type>varchar</type> | |
3c7d2158 | 51 | <length>64</length> |
6a488035 TO |
52 | <required>true</required> |
53 | <comment>Name of table where item being referenced is stored (contact assigned to given activity).</comment> | |
54 | <add>1.8</add> | |
3c7d2158 | 55 | <drop>2.0</drop> |
29e8791c | 56 | </field> |
6a488035 | 57 | |
29e8791c | 58 | <field> |
6a488035 TO |
59 | <name>target_entity_id</name> |
60 | <type>int unsigned</type> | |
61 | <required>true</required> | |
62 | <comment>Foreign key to the referenced item.</comment> | |
63 | <add>1.1</add> | |
3c7d2158 | 64 | <drop>2.0</drop> |
29e8791c | 65 | </field> |
6a488035 | 66 | |
29e8791c | 67 | <dynamicForeignKey> |
71e5aa5c ARW |
68 | <idColumn>target_entity_id</idColumn> |
69 | <typeColumn>target_entity_table</typeColumn> | |
70 | <add>1.8</add> | |
3c7d2158 | 71 | <drop>2.0</drop> |
29e8791c | 72 | </dynamicForeignKey> |
71e5aa5c | 73 | |
29e8791c | 74 | <field> |
6a488035 TO |
75 | <name>activity_id</name> |
76 | <type>int unsigned</type> | |
77 | <title>Activity ID</title> | |
78 | <required>true</required> | |
79 | <comment>Foreign key to the activity for this assignment.</comment> | |
80 | <add>2.0</add> | |
29e8791c EM |
81 | </field> |
82 | <foreignKey> | |
6a488035 TO |
83 | <name>activity_id</name> |
84 | <table>civicrm_activity</table> | |
85 | <key>id</key> | |
86 | <add>2.0</add> | |
87 | <onDelete>CASCADE</onDelete> | |
88 | </foreignKey> | |
89 | ||
29e8791c | 90 | <field> |
6a488035 TO |
91 | <name>assignee_contact_id</name> |
92 | <type>int unsigned</type> | |
93 | <title>Assignee Contact ID</title> | |
94 | <required>true</required> | |
95 | <comment>Foreign key to the contact for this assignment.</comment> | |
96 | <add>2.0</add> | |
29e8791c EM |
97 | </field> |
98 | <foreignKey> | |
6a488035 TO |
99 | <name>assignee_contact_id</name> |
100 | <table>civicrm_contact</table> | |
101 | <key>id</key> | |
102 | <add>2.0</add> | |
103 | <onDelete>CASCADE</onDelete> | |
104 | </foreignKey> | |
105 | ||
106 | <index> | |
29e8791c EM |
107 | <name>UI_activity_assignee_contact_id</name> |
108 | <fieldName>assignee_contact_id</fieldName> | |
109 | <fieldName>activity_id</fieldName> | |
110 | <unique>true</unique> | |
111 | <add>2.0</add> | |
6a488035 TO |
112 | </index> |
113 | ||
114 | ||
115 | </table> |