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