Merge pull request #2519 from jitendrapurohit/CRM-13833
[civicrm-core.git] / xml / schema / Contact / Contact.xml
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>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <title>Internal Contact ID</title>
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>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
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>
42 </field>
43 <index>
44 <name>index_contact_type</name>
45 <fieldName>contact_type</fieldName>
46 <add>2.1</add>
47 </index>
48 <field>
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>
64 <type>Multi-Select</type>
65 </html>
66 <add>1.5</add>
67 </field>
68 <index>
69 <name>index_contact_sub_type</name>
70 <fieldName>contact_sub_type</fieldName>
71 <html>
72 <type>Multi-Select</type>
73 </html>
74 <add>2.1</add>
75 </index>
76 <field>
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>
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>
145 <html>
146 <type>CheckBox</type>
147 </html>
148 </field>
149 <field>
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>
156 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.</comment>
157 <add>1.1</add>
158 <html>
159 <type>Text</type>
160 </html>
161 </field>
162 <field>
163 <name>external_identifier</name>
164 <type>varchar</type>
165 <length>32</length>
166 <html>
167 <type>Text</type>
168 <size>EIGHT</size>
169 </html>
170
171 <import>true</import>
172 <headerPattern>/external\s?id/i</headerPattern>
173 <dataPattern>/^\d{11,}$/</dataPattern>
174 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
175 <add>1.1</add>
176 </field>
177 <index>
178 <name>UI_external_identifier</name>
179 <unique>true</unique>
180 <fieldName>external_identifier</fieldName>
181 <add>1.7</add>
182 </index>
183 <field>
184 <name>sort_name</name>
185 <title>Sort Name</title>
186 <type>varchar</type>
187 <length>128</length>
188 <html>
189 <type>Text</type>
190 <size>BIG</size>
191 </html>
192
193 <export>true</export>
194 <comment>Name used for sorting different contact types</comment>
195 <add>1.1</add>
196 </field>
197 <index>
198 <name>index_sort_name</name>
199 <fieldName>sort_name</fieldName>
200 <add>2.1</add>
201 </index>
202 <field>
203 <name>display_name</name>
204 <title>Display Name</title>
205 <type>varchar</type>
206 <length>128</length>
207 <html>
208 <type>Text</type>
209 <size>BIG</size>
210 </html>
211
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>
223 <size>BIG</size>
224 </html>
225
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>
239 <size>BIG</size>
240 </html>
241
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>
254 <html>
255 <type>Text</type>
256 <size>BIG</size>
257 </html>
258
259 <import>true</import>
260 <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
261 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
262 <comment>optional "home page" URL for this contact.</comment>
263 <add>1.1</add>
264 <drop>3.2</drop>
265 </field>
266 <field>
267 <name>image_URL</name>
268 <type>varchar</type>
269 <length>255</length>
270 <import>true</import>
271 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
272 <add>1.1</add>
273 <html>
274 <type>Text</type>
275 </html>
276 </field>
277 <field>
278 <name>preferred_communication_method</name>
279 <title>Preferred Communication Method</title>
280 <type>varchar</type>
281 <length>255</length>
282 <import>true</import>
283 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
284 <dataPattern>/^\w+$/</dataPattern>
285 <comment>What is the preferred mode of communication.</comment>
286 <add>1.1</add>
287 <pseudoconstant>
288 <optionGroupName>preferred_communication_method</optionGroupName>
289 </pseudoconstant>
290 <html>
291 <type>Select</type>
292 </html>
293 </field>
294 <index>
295 <name>index_preferred_communication_method</name>
296 <fieldName>preferred_communication_method</fieldName>
297 <add>1.6</add>
298 </index>
299 <field>
300 <name>preferred_language</name>
301 <title>Preferred Language</title>
302 <type>varchar</type>
303 <length>5</length>
304 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
305 <headerPattern>/^lang/i</headerPattern>
306 <import>true</import>
307 <pseudoconstant>
308 <optionGroupName>languages</optionGroupName>
309 <keyColumn>name</keyColumn>
310 </pseudoconstant>
311 <html>
312 <type>Select</type>
313 </html>
314 <add>3.2</add>
315 </field>
316 <field>
317 <name>preferred_mail_format</name>
318 <type>varchar</type>
319 <length>8</length>
320 <default>"Both"</default>
321 <import>true</import>
322 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
323 <comment>What is the preferred mode of sending an email.</comment>
324 <add>1.1</add>
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>
338 </field>
339 <index>
340 <name>index_hash</name>
341 <fieldName>hash</fieldName>
342 <add>2.1</add>
343 </index>
344 <field>
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>
350 </field>
351 <index>
352 <name>index_api_key</name>
353 <fieldName>api_key</fieldName>
354 <add>2.1</add>
355 </index>
356 <field>
357 <name>source</name>
358 <title>Source of Contact Data</title>
359 <uniqueName>contact_source</uniqueName>
360 <type>varchar</type>
361 <length>255</length>
362 <html>
363 <type>Text</type>
364 <size>BIG</size>
365 </html>
366
367 <import>true</import>
368 <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/i</headerPattern>
369 <comment>where contact come from, e.g. import, donate module insert...</comment>
370 <add>1.1</add>
371 </field>
372 <field>
373 <name>first_name</name>
374 <type>varchar</type>
375 <length>64</length>
376 <html>
377 <type>Text</type>
378 <size>BIG</size>
379 </html>
380 <import>true</import>
381 <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
382 <dataPattern>/^\w+$/</dataPattern>
383 <fulltext/>
384 <comment>First Name.</comment>
385 <add>1.1</add>
386 </field>
387 <index>
388 <name>index_first_name</name>
389 <fieldName>first_name</fieldName>
390 <add>1.8</add>
391 </index>
392 <field>
393 <name>middle_name</name>
394 <type>varchar</type>
395 <length>64</length>
396 <html>
397 <type>Text</type>
398 <size>MEDIUM</size>
399 </html>
400 <import>true</import>
401 <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
402 <dataPattern>/^\w+$/</dataPattern>
403 <fulltext/>
404 <comment>Middle Name.</comment>
405 <add>1.1</add>
406 </field>
407 <field>
408 <name>last_name</name>
409 <type>varchar</type>
410 <length>64</length>
411 <html>
412 <type>Text</type>
413 <size>BIG</size>
414 </html>
415 <import>true</import>
416 <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
417 <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
418 <comment>Last Name.</comment>
419 <fulltext/>
420 <add>1.1</add>
421 </field>
422 <index>
423 <name>index_last_name</name>
424 <fieldName>last_name</fieldName>
425 <add>1.8</add>
426 <html>
427 <type>Text</type>
428 </html>
429 </index>
430 <field>
431 <name>prefix_id</name>
432 <title>Individual Prefix</title>
433 <type>int unsigned</type>
434 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
435 <pseudoconstant>
436 <optionGroupName>individual_prefix</optionGroupName>
437 </pseudoconstant>
438 <html>
439 <type>Select</type>
440 </html>
441 <headerPattern>/^(prefix|title)/i</headerPattern>
442 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
443 <import>true</import>
444 <add>1.2</add>
445 </field>
446 <index>
447 <name>UI_prefix</name>
448 <fieldName>prefix_id</fieldName>
449 <add>1.6</add>
450 </index>
451 <field>
452 <name>suffix_id</name>
453 <title>Individual Suffix</title>
454 <type>int unsigned</type>
455 <pseudoconstant>
456 <optionGroupName>individual_suffix</optionGroupName>
457 </pseudoconstant>
458 <html>
459 <type>Select</type>
460 </html>
461 <import>true</import>
462 <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
463 <headerPattern>/^suffix$/i</headerPattern>
464 <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
465 <add>1.2</add>
466 </field>
467 <index>
468 <name>UI_suffix</name>
469 <fieldName>suffix_id</fieldName>
470 <add>1.6</add>
471 </index>
472 <field>
473 <name>formal_title</name>
474 <type>varchar</type>
475 <length>64</length>
476 <import>true</import>
477 <headerPattern>/^title/i</headerPattern>
478 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
479 <add>4.5</add>
480 </field>
481 <field>
482 <name>communication_style_id</name>
483 <title>Communication Style</title>
484 <type>int unsigned</type>
485 <pseudoconstant>
486 <optionGroupName>communication_style</optionGroupName>
487 </pseudoconstant>
488 <export>true</export>
489 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
490 <add>4.4</add>
491 </field>
492 <index>
493 <name>index_communication_style_id</name>
494 <fieldName>communication_style_id</fieldName>
495 <add>4.4</add>
496 </index>
497 <field>
498 <name>greeting_type</name>
499 <type>varchar</type>
500 <length>128</length>
501 <import>true</import>
502 <comment>Preferred greeting format.</comment>
503 <add>1.1</add>
504 <drop>2.2</drop>
505 </field>
506 <field>
507 <name>greeting_type_id</name>
508 <title>Greeting Type</title>
509 <type>int unsigned</type>
510 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
511 <add>2.2</add>
512 <drop>3.0</drop>
513 </field>
514 <field>
515 <name>custom_greeting</name>
516 <type>varchar</type>
517 <length>128</length>
518 <import>true</import>
519 <comment>Custom greeting message.</comment>
520 <add>1.1</add>
521 <drop>3.0</drop>
522 </field>
523 <field>
524 <name>email_greeting_id</name>
525 <type>int unsigned</type>
526 <title>Email Greeting ID</title>
527 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
528 <add>3.0</add>
529 </field>
530 <field>
531 <name>email_greeting_custom</name>
532 <type>varchar</type>
533 <length>128</length>
534 <import>true</import>
535 <export>false</export>
536 <comment>Custom Email Greeting.</comment>
537 <add>3.0</add>
538 <html>
539 <type>Text</type>
540 </html>
541 </field>
542 <field>
543 <name>email_greeting_display</name>
544 <title>Email Greeting</title>
545 <type>varchar</type>
546 <length>255</length>
547 <comment>Cache Email Greeting.</comment>
548 <add>3.0</add>
549 <html>
550 <type>Text</type>
551 </html>
552 </field>
553 <field>
554 <name>postal_greeting_id</name>
555 <type>int unsigned</type>
556 <title>Postal Greeting ID</title>
557 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
558 <add>3.0</add>
559 <html>
560 <type>Text</type>
561 </html>
562 </field>
563 <field>
564 <name>postal_greeting_custom</name>
565 <type>varchar</type>
566 <length>128</length>
567 <import>true</import>
568 <export>false</export>
569 <comment>Custom Postal greeting.</comment>
570 <add>3.0</add>
571 <html>
572 <type>Text</type>
573 </html>
574 </field>
575 <field>
576 <name>postal_greeting_display</name>
577 <title>Postal Greeting</title>
578 <type>varchar</type>
579 <length>255</length>
580 <comment>Cache Postal greeting.</comment>
581 <add>3.0</add>
582 <html>
583 <type>Text</type>
584 </html>
585 </field>
586 <field>
587 <name>addressee_id</name>
588 <type>int unsigned</type>
589 <title>Addressee ID</title>
590 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
591 <add>3.0</add>
592 </field>
593 <field>
594 <name>addressee_custom</name>
595 <type>varchar</type>
596 <length>128</length>
597 <import>true</import>
598 <export>false</export>
599 <comment>Custom Addressee.</comment>
600 <add>3.0</add>
601 <html>
602 <type>Text</type>
603 </html>
604 </field>
605 <field>
606 <name>addressee_display</name>
607 <title>Addressee</title>
608 <type>varchar</type>
609 <length>255</length>
610 <comment>Cache Addressee.</comment>
611 <add>3.0</add>
612 <html>
613 <type>Text</type>
614 </html>
615 </field>
616 <field>
617 <name>job_title</name>
618 <type>varchar</type>
619 <length>255</length>
620 <html>
621 <type>Text</type>
622 <size>MEDIUM</size>
623 </html>
624 <import>true</import>
625 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
626 <dataPattern>//</dataPattern>
627 <comment>Job Title</comment>
628 <add>1.1</add>
629 </field>
630 <field>
631 <name>gender_id</name>
632 <title>Gender</title>
633 <type>int unsigned</type>
634 <pseudoconstant>
635 <optionGroupName>gender</optionGroupName>
636 </pseudoconstant>
637 <html>
638 <type>Select</type>
639 </html>
640 <headerPattern>/^gender$/i</headerPattern>
641 <comment>FK to gender ID</comment>
642 <import>true</import>
643 <add>1.2</add>
644 </field>
645 <index>
646 <name>UI_gender</name>
647 <fieldName>gender_id</fieldName>
648 <add>1.6</add>
649 <html>
650 <type>Select</type>
651 </html>
652 </index>
653 <field>
654 <name>birth_date</name>
655 <type>date</type>
656 <import>true</import>
657 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
658 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
659 <comment>Date of birth</comment>
660 <add>1.1</add>
661 <html>
662 <type>Select Date</type>
663 </html>
664 </field>
665 <field>
666 <name>is_deceased</name>
667 <title>Is Deceased</title>
668 <import>true</import>
669 <export>true</export>
670 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
671 <type>boolean</type>
672 <default>0</default>
673 <add>1.1</add>
674 <html>
675 <type>CheckBox</type>
676 </html>
677 </field>
678 <field>
679 <name>deceased_date</name>
680 <type>date</type>
681 <import>true</import>
682 <export>true</export>
683 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
684 <comment>Date of deceased</comment>
685 <add>1.5</add>
686 <html>
687 <type>Select Date</type>
688 </html>
689 </field>
690 <field>
691 <name>mail_to_household_id</name>
692 <title>Mail to Household ID</title>
693 <type>int unsigned</type>
694 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.</comment>
695 <export>true</export>
696 <add>1.1</add>
697 <drop>3.3</drop>
698 </field>
699 <foreignKey>
700 <name>mail_to_household_id</name>
701 <table>civicrm_contact</table>
702 <key>id</key>
703 <add>2.1</add>
704 <onDelete>SET NULL</onDelete>
705 <drop>3.3</drop>
706 </foreignKey>
707 <field>
708 <name>household_name</name>
709 <type>varchar</type>
710 <length>128</length>
711 <html>
712 <type>Text</type>
713 <size>BIG</size>
714 </html>
715 <import>true</import>
716 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
717 <dataPattern>/^\w+$/</dataPattern>
718 <comment>Household Name.</comment>
719 <fulltext/>
720 <add>1.1</add>
721 </field>
722 <index>
723 <name>index_household_name</name>
724 <fieldName>household_name</fieldName>
725 <add>1.8</add>
726 </index>
727 <field>
728 <name>primary_contact_id</name>
729 <type>int unsigned</type>
730 <title>Household Primary Contact ID</title>
731 <comment>Optional FK to Primary Contact for this household.</comment>
732 <add>1.1</add>
733 <html>
734 <type>Select</type>
735 </html>
736 </field>
737 <foreignKey>
738 <name>primary_contact_id</name>
739 <table>civicrm_contact</table>
740 <key>id</key>
741 <add>1.1</add>
742 <onDelete>SET NULL</onDelete>
743 </foreignKey>
744 <field>
745 <name>organization_name</name>
746 <type>varchar</type>
747 <length>128</length>
748 <html>
749 <type>Text</type>
750 <size>BIG</size>
751 </html>
752 <import>true</import>
753 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
754 <dataPattern>/^\w+$/</dataPattern>
755 <comment>Organization Name.</comment>
756 <fulltext/>
757 <add>1.1</add>
758 </field>
759 <index>
760 <name>index_organization_name</name>
761 <fieldName>organization_name</fieldName>
762 <add>1.8</add>
763 </index>
764 <field>
765 <name>sic_code</name>
766 <type>varchar</type>
767 <length>8</length>
768 <import>true</import>
769 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
770 <comment>Standard Industry Classification Code.</comment>
771 <add>1.1</add>
772 <html>
773 <type>Text</type>
774 </html>
775 </field>
776 <field>
777 <name>user_unique_id</name>
778 <rule>url</rule>
779 <title>Unique ID (OpenID)</title>
780 <type>varchar</type>
781 <length>255</length>
782 <import>true</import>
783 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
784 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
785 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
786 <add>2.0</add>
787 <html>
788 <type>Text</type>
789 </html>
790 </field>
791 <field>
792 <name>employer_id</name>
793 <title>Current Employer ID</title>
794 <uniqueName>current_employer_id</uniqueName>
795 <type>int unsigned</type>
796 <comment>OPTIONAL FK to civicrm_contact record.</comment>
797 <export>true</export>
798 <add>2.1</add>
799 <html>
800 <type>Autocomplete-Select</type>
801 </html>
802 </field>
803 <foreignKey>
804 <name>employer_id</name>
805 <table>civicrm_contact</table>
806 <key>id</key>
807 <add>2.1</add>
808 <onDelete>SET NULL</onDelete>
809 </foreignKey>
810 <field>
811 <name>is_deleted</name>
812 <title>Contact is in Trash</title>
813 <uniqueName>contact_is_deleted</uniqueName>
814 <type>boolean</type>
815 <default>0</default>
816 <required>true</required>
817 <export>true</export>
818 <add>3.2</add>
819 <html>
820 <type>CheckBox</type>
821 </html>
822 </field>
823 <index>
824 <name>index_is_deleted</name>
825 <fieldName>is_deleted</fieldName>
826 <add>3.2</add>
827 <drop>4.4</drop>
828 </index>
829 <index>
830 <name>index_is_deleted_sort_name</name>
831 <fieldName>is_deleted</fieldName>
832 <fieldName>sort_name</fieldName>
833 <fieldName>id</fieldName>
834 <add>4.4</add>
835 </index>
836 <field>
837 <name>created_date</name>
838 <type>timestamp</type>
839 <comment>When was the contact was created.</comment>
840 <required>false</required>
841 <default>NULL</default>
842 <add>4.3</add>
843 </field>
844 <field>
845 <name>modified_date</name>
846 <type>timestamp</type>
847 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
848 <required>false</required>
849 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
850 <add>4.3</add>
851 </field>
852 </table>