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