Merge pull request #21944 from masetto/unit_plural
[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 <title>Mapping Field ID</title>
13 <required>true</required>
14 <comment>Mapping Field ID</comment>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.2</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 <add>1.2</add>
24 </primaryKey>
25 <field>
26 <name>mapping_id</name>
27 <type>int unsigned</type>
28 <title>Mapping ID</title>
29 <required>true</required>
30 <comment>Mapping to which this field belongs</comment>
31 <html>
32 <label>Mapping</label>
33 </html>
34 <add>1.2</add>
35 </field>
36 <foreignKey>
37 <name>mapping_id</name>
38 <table>civicrm_mapping</table>
39 <key>id</key>
40 <add>1.2</add>
41 <onDelete>CASCADE</onDelete>
42 </foreignKey>
43 <field>
44 <name>name</name>
45 <title>Field Name (or unique reference)</title>
46 <type>varchar</type>
47 <length>255</length>
48 <comment>Mapping field key</comment>
49 <add>1.2</add>
50 </field>
51 <field>
52 <name>contact_type</name>
53 <title>Contact Type</title>
54 <type>varchar</type>
55 <length>64</length>
56 <comment>Contact Type in mapping</comment>
57 <html>
58 <type>Select</type>
59 </html>
60 <add>1.2</add>
61 </field>
62 <field>
63 <name>column_number</name>
64 <title>Column Number to map to</title>
65 <type>int unsigned</type>
66 <required>true</required>
67 <comment>Column number for mapping set</comment>
68 <add>1.2</add>
69 </field>
70 <field>
71 <name>location_type_id</name>
72 <type>int unsigned</type>
73 <title>Location type ID</title>
74 <comment>Location type of this mapping, if required</comment>
75 <html>
76 <label>Location type</label>
77 </html>
78 <add>1.2</add>
79 <pseudoconstant>
80 <table>civicrm_location_type</table>
81 <keyColumn>id</keyColumn>
82 <labelColumn>display_name</labelColumn>
83 </pseudoconstant>
84 </field>
85 <foreignKey>
86 <name>location_type_id</name>
87 <table>civicrm_location_type</table>
88 <key>id</key>
89 <add>1.2</add>
90 </foreignKey>
91 <field>
92 <name>phone_type_id</name>
93 <title>Phone type ID</title>
94 <type>int unsigned</type>
95 <comment>Which type of phone does this number belongs.</comment>
96 <add>2.2</add>
97 </field>
98 <field>
99 <name>im_provider_id</name>
100 <type>int unsigned</type>
101 <title>IM provider ID</title>
102 <comment>Which type of IM Provider does this name belong.</comment>
103 <add>3.0</add>
104 <pseudoconstant>
105 <optionGroupName>instant_messenger_service</optionGroupName>
106 </pseudoconstant>
107 <html>
108 <type>Select</type>
109 </html>
110 </field>
111 <field>
112 <name>website_type_id</name>
113 <type>int unsigned</type>
114 <title>Website type ID</title>
115 <comment>Which type of website does this site belong</comment>
116 <add>3.2</add>
117 <pseudoconstant>
118 <optionGroupName>website_type</optionGroupName>
119 </pseudoconstant>
120 <html>
121 <type>Select</type>
122 </html>
123 </field>
124 <field>
125 <name>relationship_type_id</name>
126 <type>int unsigned</type>
127 <title>Relationship type ID</title>
128 <comment>Relationship type, if required</comment>
129 <html>
130 <label>Relationship type</label>
131 </html>
132 <add>1.2</add>
133 </field>
134 <foreignKey>
135 <name>relationship_type_id</name>
136 <table>civicrm_relationship_type</table>
137 <key>id</key>
138 <add>1.2</add>
139 </foreignKey>
140 <field>
141 <name>relationship_direction</name>
142 <title>Relationship Direction</title>
143 <type>varchar</type>
144 <length>6</length>
145 <add>1.7</add>
146 </field>
147 <field>
148 <name>grouping</name>
149 <title>Field Grouping</title>
150 <type>int unsigned</type>
151 <default>1</default>
152 <comment>Used to group mapping_field records into related sets (e.g. for criteria sets in search builder
153 mappings).</comment>
154 <add>1.5</add>
155 </field>
156 <field>
157 <name>operator</name>
158 <type>varchar</type>
159 <title>Operator</title>
160 <length>16</length>
161 <type>enum</type>
162 <comment>SQL WHERE operator for search-builder mapping fields (search criteria).</comment>
163 <pseudoconstant>
164 <callback>CRM_Core_SelectValues::getSearchBuilderOperators</callback>
165 </pseudoconstant>
166 <add>1.5</add>
167 <html>
168 <type>Select</type>
169 </html>
170 </field>
171 <field>
172 <name>value</name>
173 <title>Search builder where clause</title>
174 <type>varchar</type>
175 <length>255</length>
176 <comment>SQL WHERE value for search-builder mapping fields.</comment>
177 <add>1.5</add>
178 </field>
179 </table>