Merge pull request #1923 from civicrm/4.3
[civicrm-core.git] / xml / schema / Core / MappingField.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>MappingField</class>
6 <name>civicrm_mapping_field</name>
7 <comment>Individual field mappings for Mapping</comment>
8 <add>1.2</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Mapping Field ID</comment>
14 <add>1.2</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 <add>1.2</add>
20 </primaryKey>
21 <field>
22 <name>mapping_id</name>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>Mapping to which this field belongs</comment>
26 <add>1.2</add>
27 </field>
28 <foreignKey>
29 <name>mapping_id</name>
30 <table>civicrm_mapping</table>
31 <key>id</key>
32 <add>1.2</add>
33 </foreignKey>
34 <field>
35 <name>name</name>
36 <type>varchar</type>
37 <length>255</length>
38 <comment>Mapping field key</comment>
39 <add>1.2</add>
40 </field>
41 <field>
42 <name>contact_type</name>
43 <type>varchar</type>
44 <length>64</length>
45 <comment>Contact Type in mapping</comment>
46 <pseudoconstant>
47 <table>civicrm_contact_type</table>
48 <keyColumn>name</keyColumn>
49 <labelColumn>label</labelColumn>
50 </pseudoconstant>
51 <add>1.2</add>
52 </field>
53 <field>
54 <name>column_number</name>
55 <type>int unsigned</type>
56 <required>true</required>
57 <comment>Column number for mapping set</comment>
58 <add>1.2</add>
59 </field>
60 <field>
61 <name>location_type_id</name>
62 <type>int unsigned</type>
63 <comment>Location type of this mapping, if required</comment>
64 <add>1.2</add>
65 </field>
66 <foreignKey>
67 <name>location_type_id</name>
68 <table>civicrm_location_type</table>
69 <key>id</key>
70 <add>1.2</add>
71 </foreignKey>
72 <field>
73 <name>phone_type</name>
74 <type>varchar</type>
75 <length>64</length>
76 <comment>Phone type, if required</comment>
77 <add>1.2</add>
78 <drop>2.2</drop>
79 </field>
80 <field>
81 <name>phone_type_id</name>
82 <type>int unsigned</type>
83 <comment>Which type of phone does this number belongs.</comment>
84 <add>2.2</add>
85 </field>
86 <field>
87 <name>im_provider_id</name>
88 <type>int unsigned</type>
89 <comment>Which type of IM Provider does this name belong.</comment>
90 <add>3.0</add>
91 <pseudoconstant>
92 <optionGroupName>instant_messenger_service</optionGroupName>
93 </pseudoconstant>
94 </field>
95 <field>
96 <name>website_type_id</name>
97 <type>int unsigned</type>
98 <comment>Which type of website does this site belong</comment>
99 <add>3.2</add>
100 <pseudoconstant>
101 <optionGroupName>website_type</optionGroupName>
102 </pseudoconstant>
103 </field>
104 <field>
105 <name>relationship_type_id</name>
106 <type>int unsigned</type>
107 <comment>Relationship type, if required</comment>
108 <add>1.2</add>
109 </field>
110 <foreignKey>
111 <name>relationship_type_id</name>
112 <table>civicrm_relationship_type</table>
113 <key>id</key>
114 <add>1.2</add>
115 </foreignKey>
116 <field>
117 <name>relationship_direction</name>
118 <type>varchar</type>
119 <length>6</length>
120 <add>1.7</add>
121 </field>
122 <field>
123 <name>grouping</name>
124 <type>int unsigned</type>
125 <default>1</default>
126 <comment>Used to group mapping_field records into related sets (e.g. for criteria sets in search builder mappings).</comment>
127 <add>1.5</add>
128 </field>
129 <field>
130 <name>operator</name>
131 <type>enum</type>
132 <values>&#61;, !&#61;, &#62;, &#60;, &#62;&#61;, &#60;&#61;,
133 IN, NOT IN, LIKE, NOT LIKE, IS NULL, IS NOT NULL</values>
134 <comment>SQL WHERE operator for search-builder mapping fields (search criteria).</comment>
135 <add>1.5</add>
136 </field>
137 <field>
138 <name>value</name>
139 <type>varchar</type>
140 <length>255</length>
141 <comment>SQL WHERE value for search-builder mapping fields.</comment>
142 <add>1.5</add>
143 </field>
144 </table>