Fix titles that contain entity name
[civicrm-core.git] / xml / schema / Contact / Contact.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Contact</base>
5 <class>Contact</class>
6 <name>civicrm_contact</name>
7 <comment>Contact objects are defined by a civicrm_contact record plus a related civicrm_contact_type record.</comment>
8 <add>1.1</add>
9 <log>true</log>
449c4e6b 10 <icon>fa-address-book-o</icon>
8ab43c93 11 <labelField>display_name</labelField>
a7bd99ff 12 <paths>
5c385299 13 <add>civicrm/contact/add?reset=1&amp;ct=[contact_type]</add>
a7bd99ff 14 <view>civicrm/contact/view?reset=1&amp;cid=[id]</view>
5c385299 15 <update>civicrm/contact/add?reset=1&amp;action=update&amp;cid=[id]</update>
a7bd99ff
CW
16 <delete>civicrm/contact/view/delete?reset=1&amp;delete=1&amp;cid=[id]</delete>
17 </paths>
8f069c03
EM
18 <field>
19 <name>id</name>
20 <type>int unsigned</type>
d79be26c 21 <title>Contact ID</title>
8f069c03
EM
22 <import>true</import>
23 <headerPattern>/internal|contact?|id$/i</headerPattern>
24 <required>true</required>
25 <comment>Unique Contact ID</comment>
0481e12c
A
26 <html>
27 <type>Number</type>
28 </html>
8f069c03 29 <add>1.1</add>
6a488035
TO
30 </field>
31 <primaryKey>
8f069c03
EM
32 <name>id</name>
33 <autoincrement>true</autoincrement>
6a488035
TO
34 </primaryKey>
35 <field>
8f069c03
EM
36 <name>contact_type</name>
37 <title>Contact Type</title>
38 <type>varchar</type>
39 <length>64</length>
40 <comment>Type of Contact.</comment>
41 <export>true</export>
42 <pseudoconstant>
43 <table>civicrm_contact_type</table>
44 <keyColumn>name</keyColumn>
45 <labelColumn>label</labelColumn>
46 <condition>parent_id IS NULL</condition>
47 </pseudoconstant>
48 <html>
49 <type>Select</type>
50 </html>
51 <add>1.1</add>
52 <change>3.1</change>
f5c0f096 53 <contactType>null</contactType>
6a488035
TO
54 </field>
55 <index>
8f069c03
EM
56 <name>index_contact_type</name>
57 <fieldName>contact_type</fieldName>
58 <add>2.1</add>
6a488035
TO
59 </index>
60 <field>
8f069c03
EM
61 <name>contact_sub_type</name>
62 <title>Contact Subtype</title>
63 <type>varchar</type>
64 <length>255</length>
65 <export>true</export>
66 <import>true</import>
67 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i</headerPattern>
68 <comment>May be used to over-ride contact view and edit templates.</comment>
69 <pseudoconstant>
70 <table>civicrm_contact_type</table>
71 <keyColumn>name</keyColumn>
72 <labelColumn>label</labelColumn>
73 <condition>parent_id IS NOT NULL</condition>
74 </pseudoconstant>
75 <html>
916b6181
CW
76 <type>Select</type>
77 <multiple>1</multiple>
8f069c03 78 </html>
2a5c9b4d 79 <serialize>SEPARATOR_BOOKEND</serialize>
8f069c03 80 <add>1.5</add>
6a488035
TO
81 </field>
82 <index>
8f069c03
EM
83 <name>index_contact_sub_type</name>
84 <fieldName>contact_sub_type</fieldName>
8f069c03 85 <add>2.1</add>
6a488035
TO
86 </index>
87 <field>
8f069c03
EM
88 <name>do_not_email</name>
89 <type>boolean</type>
90 <import>true</import>
91 <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
92 <dataPattern>/^\d{1,}$/</dataPattern>
93 <default>0</default>
94 <html>
95 <type>CheckBox</type>
96 </html>
97 <add>1.1</add>
98 </field>
99 <field>
100 <name>do_not_phone</name>
101 <type>boolean</type>
102 <default>0</default>
103 <import>true</import>
104 <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
105 <dataPattern>/^\d{1,}$/</dataPattern>
106 <add>1.1</add>
107 <html>
108 <type>CheckBox</type>
109 </html>
110 </field>
111 <field>
112 <name>do_not_mail</name>
113 <type>boolean</type>
114 <import>true</import>
115 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
116 <dataPattern>/^\d{1,}$/</dataPattern>
117 <default>0</default>
118 <add>1.1</add>
119 <html>
120 <type>CheckBox</type>
121 </html>
122 </field>
123 <field>
124 <name>do_not_sms</name>
125 <type>boolean</type>
126 <import>true</import>
127 <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
128 <dataPattern>/^\d{1,}$/</dataPattern>
129 <default>0</default>
130 <add>3.0</add>
131 <html>
132 <type>CheckBox</type>
133 </html>
134 </field>
135 <field>
136 <name>do_not_trade</name>
137 <type>boolean</type>
138 <import>true</import>
139 <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
140 <dataPattern>/^\d{1,}$/</dataPattern>
141 <default>0</default>
142 <add>1.1</add>
143 <html>
144 <type>CheckBox</type>
145 </html>
6a488035
TO
146 </field>
147 <field>
148 <name>is_opt_out</name>
149 <type>boolean</type>
150 <title>No Bulk Emails (User Opt Out)</title>
151 <default>0</default>
152 <import>true</import>
153 <required>true</required>
154 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
155 <add>1.1</add>
614d72ec 156 <html>
8f069c03
EM
157 <type>CheckBox</type>
158 </html>
6a488035
TO
159 </field>
160 <field>
8f069c03
EM
161 <name>legal_identifier</name>
162 <type>varchar</type>
163 <length>32</length>
164 <import>true</import>
165 <headerPattern>/legal\s?id/i</headerPattern>
166 <dataPattern>/\w+?\d{5,}/</dataPattern>
fb607354 167 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.</comment>
8f069c03
EM
168 <add>1.1</add>
169 <html>
170 <type>Text</type>
171 </html>
6a488035
TO
172 </field>
173 <field>
8f069c03
EM
174 <name>external_identifier</name>
175 <type>varchar</type>
b5618f69 176 <length>64</length>
8f069c03
EM
177 <html>
178 <type>Text</type>
54f5e87f 179 <size>8</size>
8f069c03 180 </html>
614d72ec 181
8f069c03
EM
182 <import>true</import>
183 <headerPattern>/external\s?id/i</headerPattern>
184 <dataPattern>/^\d{11,}$/</dataPattern>
a005e91a 185 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
8f069c03 186 <add>1.1</add>
6a488035
TO
187 </field>
188 <index>
8f069c03
EM
189 <name>UI_external_identifier</name>
190 <unique>true</unique>
191 <fieldName>external_identifier</fieldName>
192 <add>1.7</add>
6a488035
TO
193 </index>
194 <field>
8f069c03
EM
195 <name>sort_name</name>
196 <title>Sort Name</title>
197 <type>varchar</type>
198 <length>128</length>
199 <html>
200 <type>Text</type>
54f5e87f 201 <size>30</size>
8f069c03 202 </html>
614d72ec 203
8f069c03
EM
204 <export>true</export>
205 <comment>Name used for sorting different contact types</comment>
206 <add>1.1</add>
6a488035
TO
207 </field>
208 <index>
8f069c03
EM
209 <name>index_sort_name</name>
210 <fieldName>sort_name</fieldName>
211 <add>2.1</add>
6a488035
TO
212 </index>
213 <field>
8f069c03
EM
214 <name>display_name</name>
215 <title>Display Name</title>
216 <type>varchar</type>
217 <length>128</length>
218 <html>
219 <type>Text</type>
54f5e87f 220 <size>30</size>
8f069c03 221 </html>
614d72ec 222
8f069c03
EM
223 <export>true</export>
224 <comment>Formatted name representing preferred format for display/print/other output.</comment>
225 <add>1.1</add>
226 </field>
227 <field>
228 <name>nick_name</name>
229 <title>Nickname</title>
230 <type>varchar</type>
231 <length>128</length>
232 <html>
233 <type>Text</type>
54f5e87f 234 <size>30</size>
8f069c03 235 </html>
614d72ec 236
8f069c03
EM
237 <import>true</import>
238 <headerPattern>/n(ick\s)name|nick$/i</headerPattern>
239 <dataPattern>/^\w+$/</dataPattern>
240 <comment>Nickname.</comment>
241 <fulltext/>
242 <add>1.1</add>
243 </field>
244 <field>
245 <name>legal_name</name>
246 <type>varchar</type>
247 <length>128</length>
248 <html>
249 <type>Text</type>
54f5e87f 250 <size>30</size>
8f069c03 251 </html>
b383d043 252 <contactType>Organization</contactType>
8f069c03
EM
253 <import>true</import>
254 <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
255 <comment>Legal Name.</comment>
256 <fulltext/>
257 <add>1.1</add>
258 </field>
8f069c03
EM
259 <field>
260 <name>image_URL</name>
8e2e96a5 261 <type>text</type>
8f069c03
EM
262 <import>true</import>
263 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
264 <add>1.1</add>
265 <html>
51479855 266 <type>File</type>
54f5e87f 267 <size>30</size>
8f069c03
EM
268 </html>
269 </field>
270 <field>
271 <name>preferred_communication_method</name>
272 <title>Preferred Communication Method</title>
273 <type>varchar</type>
274 <length>255</length>
275 <import>true</import>
276 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
277 <dataPattern>/^\w+$/</dataPattern>
278 <comment>What is the preferred mode of communication.</comment>
279 <add>1.1</add>
280 <pseudoconstant>
281 <optionGroupName>preferred_communication_method</optionGroupName>
282 </pseudoconstant>
283 <html>
284 <type>Select</type>
2a5c9b4d 285 <multiple>1</multiple>
8f069c03 286 </html>
2a5c9b4d 287 <serialize>SEPARATOR_BOOKEND</serialize>
6a488035
TO
288 </field>
289 <index>
8f069c03
EM
290 <name>index_preferred_communication_method</name>
291 <fieldName>preferred_communication_method</fieldName>
292 <add>1.6</add>
6a488035
TO
293 </index>
294 <field>
8f069c03
EM
295 <name>preferred_language</name>
296 <title>Preferred Language</title>
297 <type>varchar</type>
298 <length>5</length>
299 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
300 <headerPattern>/^lang/i</headerPattern>
301 <import>true</import>
302 <pseudoconstant>
303 <optionGroupName>languages</optionGroupName>
304 <keyColumn>name</keyColumn>
305 </pseudoconstant>
306 <html>
307 <type>Select</type>
308 </html>
309 <add>3.2</add>
310 </field>
311 <field>
312 <name>preferred_mail_format</name>
313 <type>varchar</type>
314 <length>8</length>
315 <default>"Both"</default>
316 <import>true</import>
317 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
318 <comment>What is the preferred mode of sending an email.</comment>
319 <add>1.1</add>
320 <pseudoconstant>
321 <callback>CRM_Core_SelectValues::pmf</callback>
322 </pseudoconstant>
323 <html>
324 <type>Select</type>
325 </html>
326 </field>
327 <field>
328 <name>hash</name>
329 <title>Contact Hash</title>
330 <type>varchar</type>
331 <length>32</length>
332 <comment>Key for validating requests related to this contact.</comment>
333 <add>1.1</add>
334 <change>1.5</change>
335 <export>true</export>
6a488035
TO
336 </field>
337 <index>
8f069c03
EM
338 <name>index_hash</name>
339 <fieldName>hash</fieldName>
340 <add>2.1</add>
6a488035
TO
341 </index>
342 <field>
8f069c03
EM
343 <name>api_key</name>
344 <type>varchar</type>
345 <length>32</length>
346 <comment>API Key for validating requests related to this contact.</comment>
347 <add>2.2</add>
1713a0ec
CW
348 <permission>
349 <or>administer CiviCRM, edit api keys</or>
350 </permission>
6a488035
TO
351 </field>
352 <index>
8f069c03
EM
353 <name>index_api_key</name>
354 <fieldName>api_key</fieldName>
355 <add>2.1</add>
6a488035
TO
356 </index>
357 <field>
8f069c03 358 <name>source</name>
d79be26c 359 <title>Contact Source</title>
8f069c03
EM
360 <uniqueName>contact_source</uniqueName>
361 <type>varchar</type>
362 <length>255</length>
363 <html>
364 <type>Text</type>
54f5e87f 365 <size>30</size>
8f069c03 366 </html>
614d72ec 367
8f069c03 368 <import>true</import>
d79be26c 369 <headerPattern>/(C(ontact\s)?Source)$/i</headerPattern>
8f069c03
EM
370 <comment>where contact come from, e.g. import, donate module insert...</comment>
371 <add>1.1</add>
372 </field>
373 <field>
374 <name>first_name</name>
375 <type>varchar</type>
376 <length>64</length>
377 <html>
378 <type>Text</type>
54f5e87f 379 <size>30</size>
8f069c03
EM
380 </html>
381 <import>true</import>
382 <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
383 <dataPattern>/^\w+$/</dataPattern>
384 <fulltext/>
385 <comment>First Name.</comment>
386 <add>1.1</add>
f5c0f096 387 <contactType>Individual</contactType>
6a488035
TO
388 </field>
389 <index>
8f069c03
EM
390 <name>index_first_name</name>
391 <fieldName>first_name</fieldName>
392 <add>1.8</add>
6a488035
TO
393 </index>
394 <field>
8f069c03
EM
395 <name>middle_name</name>
396 <type>varchar</type>
397 <length>64</length>
398 <html>
399 <type>Text</type>
54f5e87f 400 <size>30</size>
8f069c03
EM
401 </html>
402 <import>true</import>
403 <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
404 <dataPattern>/^\w+$/</dataPattern>
405 <fulltext/>
406 <comment>Middle Name.</comment>
407 <add>1.1</add>
f5c0f096 408 <contactType>Individual</contactType>
8f069c03
EM
409 </field>
410 <field>
411 <name>last_name</name>
412 <type>varchar</type>
413 <length>64</length>
414 <html>
415 <type>Text</type>
54f5e87f 416 <size>30</size>
8f069c03
EM
417 </html>
418 <import>true</import>
419 <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
420 <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
421 <comment>Last Name.</comment>
422 <fulltext/>
423 <add>1.1</add>
f5c0f096 424 <contactType>Individual</contactType>
6a488035
TO
425 </field>
426 <index>
8f069c03
EM
427 <name>index_last_name</name>
428 <fieldName>last_name</fieldName>
429 <add>1.8</add>
6a488035
TO
430 </index>
431 <field>
8f069c03
EM
432 <name>prefix_id</name>
433 <title>Individual Prefix</title>
434 <type>int unsigned</type>
435 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
436 <pseudoconstant>
437 <optionGroupName>individual_prefix</optionGroupName>
438 </pseudoconstant>
439 <html>
440 <type>Select</type>
441 </html>
442 <headerPattern>/^(prefix|title)/i</headerPattern>
443 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
444 <import>true</import>
445 <add>1.2</add>
f5c0f096 446 <contactType>Individual</contactType>
6a488035
TO
447 </field>
448 <index>
8f069c03
EM
449 <name>UI_prefix</name>
450 <fieldName>prefix_id</fieldName>
451 <add>1.6</add>
6a488035
TO
452 </index>
453 <field>
8f069c03
EM
454 <name>suffix_id</name>
455 <title>Individual Suffix</title>
456 <type>int unsigned</type>
457 <pseudoconstant>
458 <optionGroupName>individual_suffix</optionGroupName>
459 </pseudoconstant>
460 <html>
461 <type>Select</type>
462 </html>
463 <import>true</import>
464 <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
465 <headerPattern>/^suffix$/i</headerPattern>
466 <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
467 <add>1.2</add>
f5c0f096 468 <contactType>Individual</contactType>
6a488035
TO
469 </field>
470 <index>
8f069c03
EM
471 <name>UI_suffix</name>
472 <fieldName>suffix_id</fieldName>
473 <add>1.6</add>
6a488035 474 </index>
e171748b 475 <field>
8f069c03
EM
476 <name>formal_title</name>
477 <type>varchar</type>
478 <length>64</length>
479 <import>true</import>
0c4b273e 480 <html>
481 <type>Text</type>
482 </html>
8f069c03
EM
483 <headerPattern>/^title/i</headerPattern>
484 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
485 <add>4.5</add>
f5c0f096 486 <contactType>Individual</contactType>
8f069c03
EM
487 </field>
488 <field>
489 <name>communication_style_id</name>
490 <title>Communication Style</title>
491 <type>int unsigned</type>
492 <pseudoconstant>
493 <optionGroupName>communication_style</optionGroupName>
494 </pseudoconstant>
495 <export>true</export>
1a18ea39
CW
496 <import>true</import>
497 <headerPattern>/style/i</headerPattern>
a005e91a 498 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
8f069c03 499 <add>4.4</add>
dd4706ef
TM
500 <html>
501 <type>Select</type>
502 </html>
aa62b355
OB
503 </field>
504 <index>
8f069c03
EM
505 <name>index_communication_style_id</name>
506 <fieldName>communication_style_id</fieldName>
507 <add>4.4</add>
aa62b355 508 </index>
8f069c03
EM
509 <field>
510 <name>email_greeting_id</name>
511 <type>int unsigned</type>
512 <title>Email Greeting ID</title>
54e389ac 513 <export>true</export>
8f069c03
EM
514 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
515 <add>3.0</add>
3542118f
CW
516 <html>
517 <type>Select</type>
518 </html>
f4a9693e
SL
519 <pseudoconstant>
520 <optionGroupName>email_greeting</optionGroupName>
521 </pseudoconstant>
8f069c03
EM
522 </field>
523 <field>
524 <name>email_greeting_custom</name>
525 <type>varchar</type>
526 <length>128</length>
527 <import>true</import>
528 <export>false</export>
529 <comment>Custom Email Greeting.</comment>
530 <add>3.0</add>
531 <html>
532 <type>Text</type>
533 </html>
534 </field>
535 <field>
536 <name>email_greeting_display</name>
537 <title>Email Greeting</title>
538 <type>varchar</type>
539 <length>255</length>
540 <comment>Cache Email Greeting.</comment>
541 <add>3.0</add>
8f069c03
EM
542 </field>
543 <field>
544 <name>postal_greeting_id</name>
545 <type>int unsigned</type>
546 <title>Postal Greeting ID</title>
54e389ac 547 <export>true</export>
8f069c03
EM
548 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
549 <add>3.0</add>
550 <html>
3542118f 551 <type>Select</type>
8f069c03 552 </html>
f4a9693e
SL
553 <pseudoconstant>
554 <optionGroupName>postal_greeting</optionGroupName>
555 </pseudoconstant>
8f069c03
EM
556 </field>
557 <field>
558 <name>postal_greeting_custom</name>
559 <type>varchar</type>
560 <length>128</length>
561 <import>true</import>
562 <export>false</export>
563 <comment>Custom Postal greeting.</comment>
564 <add>3.0</add>
565 <html>
566 <type>Text</type>
567 </html>
568 </field>
569 <field>
570 <name>postal_greeting_display</name>
571 <title>Postal Greeting</title>
572 <type>varchar</type>
573 <length>255</length>
574 <comment>Cache Postal greeting.</comment>
575 <add>3.0</add>
8f069c03
EM
576 </field>
577 <field>
578 <name>addressee_id</name>
579 <type>int unsigned</type>
580 <title>Addressee ID</title>
581 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
582 <add>3.0</add>
54e389ac 583 <export>true</export>
3542118f
CW
584 <html>
585 <type>Select</type>
586 </html>
a28e9198 587 <pseudoconstant>
588 <optionGroupName>addressee</optionGroupName>
589 </pseudoconstant>
8f069c03
EM
590 </field>
591 <field>
592 <name>addressee_custom</name>
593 <type>varchar</type>
594 <length>128</length>
595 <import>true</import>
596 <export>false</export>
597 <comment>Custom Addressee.</comment>
598 <add>3.0</add>
599 <html>
600 <type>Text</type>
601 </html>
602 </field>
603 <field>
604 <name>addressee_display</name>
605 <title>Addressee</title>
606 <type>varchar</type>
607 <length>255</length>
608 <comment>Cache Addressee.</comment>
609 <add>3.0</add>
8f069c03
EM
610 </field>
611 <field>
612 <name>job_title</name>
613 <type>varchar</type>
614 <length>255</length>
615 <html>
616 <type>Text</type>
54f5e87f 617 <size>30</size>
8f069c03
EM
618 </html>
619 <import>true</import>
620 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
621 <dataPattern>//</dataPattern>
622 <comment>Job Title</comment>
623 <add>1.1</add>
f5c0f096 624 <contactType>Individual</contactType>
8f069c03
EM
625 </field>
626 <field>
627 <name>gender_id</name>
9ac33d0f 628 <title>Gender ID</title>
8f069c03
EM
629 <type>int unsigned</type>
630 <pseudoconstant>
631 <optionGroupName>gender</optionGroupName>
632 </pseudoconstant>
633 <html>
634 <type>Select</type>
9ac33d0f 635 <label>Gender</label>
8f069c03
EM
636 </html>
637 <headerPattern>/^gender$/i</headerPattern>
638 <comment>FK to gender ID</comment>
639 <import>true</import>
640 <add>1.2</add>
f5c0f096 641 <contactType>Individual</contactType>
6a488035
TO
642 </field>
643 <index>
8f069c03
EM
644 <name>UI_gender</name>
645 <fieldName>gender_id</fieldName>
646 <add>1.6</add>
6a488035
TO
647 </index>
648 <field>
8f069c03
EM
649 <name>birth_date</name>
650 <type>date</type>
651 <import>true</import>
652 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
653 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
654 <comment>Date of birth</comment>
655 <add>1.1</add>
656 <html>
657 <type>Select Date</type>
24317d89 658 <formatType>birth</formatType>
8f069c03 659 </html>
f5c0f096 660 <contactType>Individual</contactType>
8f069c03
EM
661 </field>
662 <field>
663 <name>is_deceased</name>
945ddec3 664 <title>Deceased</title>
8f069c03
EM
665 <import>true</import>
666 <export>true</export>
667 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
668 <type>boolean</type>
669 <default>0</default>
670 <add>1.1</add>
2cd5d411 671 <required>true</required>
8f069c03
EM
672 <html>
673 <type>CheckBox</type>
674 </html>
f5c0f096 675 <contactType>Individual</contactType>
8f069c03 676 </field>
27633545
SL
677 <index>
678 <name>index_is_deceased</name>
679 <fieldName>is_deceased</fieldName>
680 <add>4.7</add>
681 </index>
8f069c03
EM
682 <field>
683 <name>deceased_date</name>
684 <type>date</type>
685 <import>true</import>
686 <export>true</export>
687 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
688 <comment>Date of deceased</comment>
689 <add>1.5</add>
690 <html>
691 <type>Select Date</type>
24317d89 692 <formatType>birth</formatType>
8f069c03 693 </html>
f5c0f096 694 <contactType>Individual</contactType>
8f069c03 695 </field>
6a488035 696 <field>
8f069c03
EM
697 <name>household_name</name>
698 <type>varchar</type>
699 <length>128</length>
700 <html>
701 <type>Text</type>
54f5e87f 702 <size>30</size>
8f069c03
EM
703 </html>
704 <import>true</import>
705 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
706 <dataPattern>/^\w+$/</dataPattern>
707 <comment>Household Name.</comment>
708 <fulltext/>
709 <add>1.1</add>
f5c0f096 710 <contactType>Household</contactType>
6a488035
TO
711 </field>
712 <index>
8f069c03
EM
713 <name>index_household_name</name>
714 <fieldName>household_name</fieldName>
715 <add>1.8</add>
6a488035
TO
716 </index>
717 <field>
8f069c03
EM
718 <name>primary_contact_id</name>
719 <type>int unsigned</type>
720 <title>Household Primary Contact ID</title>
721 <comment>Optional FK to Primary Contact for this household.</comment>
57e94608
A
722 <html>
723 <label>Household Primary Contact</label>
724 </html>
8f069c03 725 <add>1.1</add>
f5c0f096 726 <contactType>Household</contactType>
6a488035
TO
727 </field>
728 <foreignKey>
8f069c03
EM
729 <name>primary_contact_id</name>
730 <table>civicrm_contact</table>
731 <key>id</key>
732 <add>1.1</add>
733 <onDelete>SET NULL</onDelete>
6a488035
TO
734 </foreignKey>
735 <field>
8f069c03
EM
736 <name>organization_name</name>
737 <type>varchar</type>
738 <length>128</length>
739 <html>
740 <type>Text</type>
54f5e87f 741 <size>30</size>
8f069c03
EM
742 </html>
743 <import>true</import>
744 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
745 <dataPattern>/^\w+$/</dataPattern>
746 <comment>Organization Name.</comment>
747 <fulltext/>
748 <add>1.1</add>
f5c0f096 749 <contactType>Organization</contactType>
6a488035
TO
750 </field>
751 <index>
8f069c03
EM
752 <name>index_organization_name</name>
753 <fieldName>organization_name</fieldName>
754 <add>1.8</add>
6a488035
TO
755 </index>
756 <field>
8f069c03
EM
757 <name>sic_code</name>
758 <type>varchar</type>
759 <length>8</length>
760 <import>true</import>
761 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
762 <comment>Standard Industry Classification Code.</comment>
763 <add>1.1</add>
764 <html>
765 <type>Text</type>
766 </html>
f5c0f096 767 <contactType>Organization</contactType>
8f069c03
EM
768 </field>
769 <field>
770 <name>user_unique_id</name>
771 <rule>url</rule>
772 <title>Unique ID (OpenID)</title>
773 <type>varchar</type>
774 <length>255</length>
775 <import>true</import>
776 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
777 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
a005e91a 778 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
8f069c03
EM
779 <add>2.0</add>
780 <html>
781 <type>Text</type>
782 </html>
783 </field>
784 <field>
785 <name>employer_id</name>
a1d226d6 786 <title>Current Employer ID</title>
8f069c03
EM
787 <uniqueName>current_employer_id</uniqueName>
788 <type>int unsigned</type>
789 <comment>OPTIONAL FK to civicrm_contact record.</comment>
790 <export>true</export>
791 <add>2.1</add>
792 <html>
916b6181 793 <type>EntityRef</type>
a1d226d6 794 <label>Current Employer</label>
8f069c03 795 </html>
f5c0f096 796 <contactType>Individual</contactType>
6a488035
TO
797 </field>
798 <foreignKey>
8f069c03
EM
799 <name>employer_id</name>
800 <table>civicrm_contact</table>
801 <key>id</key>
802 <add>2.1</add>
803 <onDelete>SET NULL</onDelete>
6a488035
TO
804 </foreignKey>
805 <field>
806 <name>is_deleted</name>
807 <title>Contact is in Trash</title>
808 <uniqueName>contact_is_deleted</uniqueName>
809 <type>boolean</type>
810 <default>0</default>
811 <required>true</required>
812 <export>true</export>
813 <add>3.2</add>
614d72ec 814 <html>
815 <type>CheckBox</type>
816 </html>
d2ff128c 817 <permission>access deleted contacts</permission>
6a488035 818 </field>
e7d940b2
DL
819 <index>
820 <name>index_is_deleted_sort_name</name>
821 <fieldName>is_deleted</fieldName>
822 <fieldName>sort_name</fieldName>
823 <fieldName>id</fieldName>
824 <add>4.4</add>
6a488035
TO
825 </index>
826 <field>
827 <name>created_date</name>
828 <type>timestamp</type>
829 <comment>When was the contact was created.</comment>
830 <required>false</required>
0fd2fe32 831 <export>true</export>
6a488035
TO
832 <default>NULL</default>
833 <add>4.3</add>
834 </field>
11e5567f 835 <index>
836 <name>index_created_date</name>
837 <fieldName>created_date</fieldName>
838 <add>5.18</add>
839 </index>
6a488035
TO
840 <field>
841 <name>modified_date</name>
842 <type>timestamp</type>
843 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
844 <required>false</required>
0fd2fe32 845 <export>true</export>
6a488035
TO
846 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
847 <add>4.3</add>
848 </field>
11e5567f 849 <index>
850 <name>index_modified_date</name>
851 <fieldName>modified_date</fieldName>
852 <add>5.18</add>
853 </index>
6a488035 854</table>