CRM-13810 - Campaign Search - remove data constraint, rename Campaign ID to Campaign...
[civicrm-core.git] / xml / schema / Activity / Activity.xml
index f18c4d324ea0db2b681d3bbd1201f284198d7a8a..8aec77bebd49616647dde2950680340c22a0e866 100644 (file)
@@ -9,7 +9,7 @@
   <field>
       <name>id</name>
       <uniqueName>activity_id</uniqueName>
-      <title>Activity ID</title> 
+      <title>Activity ID</title>
       <import>true</import>
       <type>int unsigned</type>
       <required>true</required>
@@ -23,7 +23,7 @@
   <field>
       <name>source_contact_id</name>
       <type>int unsigned</type>
-      <title>Source Contact</title> 
+      <title>Source Contact</title>
       <import>true</import>
       <headerPattern>/(activity.)?source(.contact(.id)?)?/i</headerPattern>
       <comment>Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.</comment>
        <add>1.1</add>
        <drop>4.4</drop>
        <onDelete>SET NULL</onDelete>
-  </foreignKey>  
+  </foreignKey>
   <index>
        <name>UI_source_contact_id</name>
-       <fieldName>source_contact_id</fieldName>       
+       <fieldName>source_contact_id</fieldName>
        <add>2.0</add>
        <drop>3.2</drop>
   </index>
   </field>
   <index>
        <name>UI_source_record_id</name>
-       <fieldName>source_record_id</fieldName>       
+       <fieldName>source_record_id</fieldName>
        <add>3.2</add>
   </index>
   <field>
-       <name>activity_type_id</name>
-       <title>Activity Type ID</title>
-       <import>true</import>
-       <type>int unsigned</type>
-       <required>true</required>
-       <export>false</export>
-       <default>1</default>
-       <headerPattern>/(activity.)?type(.id$)/i</headerPattern>
-       <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
-       <add>1.1</add>
+      <name>activity_type_id</name>
+      <title>Activity Type ID</title>
+      <import>true</import>
+      <type>int unsigned</type>
+      <required>true</required>
+      <export>false</export>
+      <default>1</default>
+      <headerPattern>/(activity.)?type(.id$)/i</headerPattern>
+      <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
+      <add>1.1</add>
+      <pseudoconstant>
+        <optionGroupName>activity_type</optionGroupName>
+      </pseudoconstant>
   </field>
   <index>
        <name>UI_activity_type_id</name>
-       <fieldName>activity_type_id</fieldName>       
+       <fieldName>activity_type_id</fieldName>
        <add>1.6</add>
   </index>
 
@@ -82,7 +85,7 @@
        <required>true</required>
        <comment>Name of table where item being referenced is stored.</comment>
        <add>1.1</add>
-       <drop>2.0</drop>       
+       <drop>2.0</drop>
   </field>
 
   <field>
@@ -91,7 +94,7 @@
        <required>true</required>
        <comment>Foreign key to the referenced item.</comment>
        <add>1.1</add>
-       <drop>2.0</drop>       
+       <drop>2.0</drop>
   </field>
 
   <field>
        <add>1.1</add>
        <drop>2.0</drop>
   </field>
-  
+
   <field>
        <name>activity_date_time</name>
        <import>true</import>
        <headerPattern>/(activity.)?date(.time$)?/i</headerPattern>
        <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.</comment>
        <add>2.0</add>
-  </field> 
+  </field>
   <field>
        <name>due_date_time</name>
        <type>datetime</type>
        <comment>Date and time this activity is due.</comment>
        <add>2.0</add>
-       <drop>3.0</drop>     
-  </field>  
+       <drop>3.0</drop>
+  </field>
   <field>
        <name>duration_hours</name>
        <type>int unsigned</type>
        <comment>Planned or actual duration of meeting - hours.</comment>
        <add>1.1</add>
-       <drop>2.0</drop>       
+       <drop>2.0</drop>
   </field>
 
   <field>
       <type>int unsigned</type>
       <comment>Planned or actual duration of meeting - minutes.</comment>
       <add>1.1</add>
-      <drop>2.0</drop>             
+      <drop>2.0</drop>
   </field>
 
   <field>
       <name>duration</name>
       <uniqueName>activity_duration</uniqueName>
-      <title>Duration</title> 
+      <title>Duration</title>
       <import>true</import>
       <type>int unsigned</type>
       <headerPattern>/(activity.)?duration(s)?$/i</headerPattern>
       <name>details</name>
       <uniqueName>activity_details</uniqueName>
       <title>Details</title>
-      <import>true</import> 
+      <import>true</import>
       <type>text</type>
       <rows>8</rows>
       <cols>60</cols>
       <type>int unsigned</type>
       <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment>
       <add>2.0</add>
+      <pseudoconstant>
+        <optionGroupName>activity_status</optionGroupName>
+      </pseudoconstant>
   </field>
   <field>
       <name>priority_id</name>
       <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment>
       <add>2.0</add>
       <pseudoconstant>
-        <name>priority</name>
         <optionGroupName>priority</optionGroupName>
       </pseudoconstant>
   </field>
   <field>
        <name>is_test</name>
        <title>Test</title>
-       <uniqueName>activity_is_test</uniqueName> 
+       <uniqueName>activity_is_test</uniqueName>
        <type>boolean</type>
        <default>0</default>
        <import>true</import>
        <add>2.0</add>
   </field>
   <field>
-       <name>medium_id</name>
-       <uniqueName>activity_medium_id</uniqueName>
-       <title>Activity Medium</title>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
-       <add>2.2</add>
+      <name>medium_id</name>
+      <uniqueName>activity_medium_id</uniqueName>
+      <title>Activity Medium</title>
+      <type>int unsigned</type>
+      <default>NULL</default>
+      <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
+      <pseudoconstant>
+        <optionGroupName>encounter_medium</optionGroupName>
+      </pseudoconstant>
+      <add>2.2</add>
   </field>
   <index>
        <name>index_medium_id</name>
        <type>boolean</type>
        <default>0</default>
        <add>2.2</add>
-  </field>     
-  <field> 
+  </field>
+  <field>
        <name>relationship_id</name>
        <title>Relationship Id</title>
-       <type>int unsigned</type> 
+       <type>int unsigned</type>
        <default>NULL</default>
-       <comment>FK to Relationship ID</comment> 
-       <add>2.2</add> 
+       <comment>FK to Relationship ID</comment>
+       <add>2.2</add>
   </field>
-  <foreignKey> 
-       <name>relationship_id</name> 
-       <table>civicrm_relationship</table> 
-       <key>id</key> 
+  <foreignKey>
+       <name>relationship_id</name>
+       <table>civicrm_relationship</table>
+       <key>id</key>
        <onDelete>SET NULL</onDelete>
-  </foreignKey>               
+  </foreignKey>
   <field>
        <name>is_current_revision</name>
        <title>Is this activity a current revision in versioning chain?</title>
        <name>index_is_current_revision</name>
        <fieldName>is_current_revision</fieldName>
        <add>2.2</add>
-  </index> 
+  </index>
   <field>
       <name>original_id</name>
       <type>int unsigned</type>
        <fieldName>original_id</fieldName>
        <add>2.2</add>
        <drop>3.2</drop>
-  </index>    
+  </index>
   <field>
        <name>result</name>
        <uniqueName>activity_result</uniqueName>
        <fieldName>is_deleted</fieldName>
        <add>2.2</add>
   </index>
-  <field> 
+  <field>
        <name>campaign_id</name>
        <uniqueName>activity_campaign_id</uniqueName>
        <type>int unsigned</type>
-       <title>Campaign ID</title>
-       <import>true</import> 
-       <comment>The campaign for which this activity has been triggered.</comment> 
-       <add>3.4</add> 
-  </field>
-  <field> 
-       <name>engagement_level</name>
-       <uniqueName>activity_engagement_level</uniqueName>
-       <type>int unsigned</type>
-       
-       
-       <title>Engagement Index</title>
+       <title>Campaign</title>
        <import>true</import>
-       <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment> 
-       <add>3.4</add> 
+       <comment>The campaign for which this activity has been triggered.</comment>
+       <pseudoconstant>
+          <table>civicrm_campaign</table>
+          <keyColumn>id</keyColumn>
+          <labelColumn>title</labelColumn>
+       </pseudoconstant>
+       <add>3.4</add>
   </field>
-  <foreignKey> 
-       <name>campaign_id</name> 
-       <table>civicrm_campaign</table> 
-       <key>id</key> 
+  <foreignKey>
+       <name>campaign_id</name>
+       <table>civicrm_campaign</table>
+       <key>id</key>
        <onDelete>SET NULL</onDelete>
   </foreignKey>
+  <field>
+      <name>engagement_level</name>
+      <uniqueName>activity_engagement_level</uniqueName>
+      <type>int unsigned</type>
+      <title>Engagement Index</title>
+      <import>true</import>
+      <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment>
+      <pseudoconstant>
+        <optionGroupName>engagement_index</optionGroupName>
+      </pseudoconstant>
+      <add>3.4</add>
+  </field>
   <field>
       <name>weight</name>
       <type>int</type>