Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-02-05-17-16-30
[civicrm-core.git] / xml / schema / Activity / ActivityContact.xml
index dcc903e0808d0121c02b3d4b6b7c74cb62cd0f33..0463a9a1dbdc96742100e1b5b440709c6d85aefe 100644 (file)
@@ -5,7 +5,7 @@
   <name>civicrm_activity_contact</name>
   <comment>Activity Contact</comment>
   <archive>true</archive>
-  <add>4.3</add>
+  <add>4.4</add>
   <log>true</log>
   <field>
     <name>id</name>
@@ -13,7 +13,7 @@
     <title>Activity Contact ID</title>
     <required>true</required>
     <comment>Activity contact id</comment>
-    <add>4.3</add>
+    <add>4.4</add>
   </field>
   <primaryKey>
     <name>id</name>
     <title>Activity ID</title>
     <required>true</required>
     <comment>Foreign key to the activity for this record.</comment>
-    <add>4.3</add>
+    <add>4.4</add>
    </field>
    <foreignKey>
     <name>activity_id</name>
     <table>civicrm_activity</table>
     <key>id</key>
-    <add>4.3</add>
+    <add>4.4</add>
     <onDelete>CASCADE</onDelete>
   </foreignKey>
    <field>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Foreign key to the contact for this record.</comment>
-    <add>4.3</add>
+    <add>4.4</add>
    </field>
    <foreignKey>
     <name>contact_id</name>
     <table>civicrm_contact</table>
     <key>id</key>
-    <add>4.3</add>
+    <add>4.4</add>
     <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-    <name>record_type</name>
-    <type>enum</type>
-    <title>Record Type</title>
-    <values>Source, Assignee, Target</values>
-    <comment>The record type for this row</comment>
-    <add>4.3</add>
+    <name>record_type_id</name>
+    <type>int unsigned</type>
+    <title>Record Type ID</title>
+    <comment>Contents vary depending on the activity type. Code using custom activities may use this field as they choose fit.</comment>
+    <pseudoconstant>
+      <optionGroupName>activity_contacts</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>4.4</add>
   </field>
   <index>
-       <name>UI_activity_target_contact_id</name>
-       <fieldName>target_contact_id</fieldName>
-       <fieldName>activity_id</fieldName>
-       <unique>true</unique>
-       <add>4.3</add>
+    <name>UI_activity_contact</name>
+    <fieldName>contact_id</fieldName>
+    <fieldName>activity_id</fieldName>
+    <fieldName>record_type_id</fieldName>
+    <unique>true</unique>
+    <add>4.4</add>
+  </index>
+  <index>
+    <name>index_record_type</name>
+    <fieldName>activity_id</fieldName>
+    <fieldName>record_type_id</fieldName>
+    <add>4.4</add>
   </index>
-
-
 </table>