Merge pull request #7603 from jitendrapurohit/CRM-17810
[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>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>Select</type>
65 <multiple>1</multiple>
66 </html>
67 <add>1.5</add>
68 </field>
69 <index>
70 <name>index_contact_sub_type</name>
71 <fieldName>contact_sub_type</fieldName>
72 <add>2.1</add>
73 </index>
74 <field>
75 <name>do_not_email</name>
76 <type>boolean</type>
77 <import>true</import>
78 <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
79 <dataPattern>/^\d{1,}$/</dataPattern>
80 <default>0</default>
81 <html>
82 <type>CheckBox</type>
83 </html>
84 <add>1.1</add>
85 </field>
86 <field>
87 <name>do_not_phone</name>
88 <type>boolean</type>
89 <default>0</default>
90 <import>true</import>
91 <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
92 <dataPattern>/^\d{1,}$/</dataPattern>
93 <add>1.1</add>
94 <html>
95 <type>CheckBox</type>
96 </html>
97 </field>
98 <field>
99 <name>do_not_mail</name>
100 <type>boolean</type>
101 <import>true</import>
102 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
103 <dataPattern>/^\d{1,}$/</dataPattern>
104 <default>0</default>
105 <add>1.1</add>
106 <html>
107 <type>CheckBox</type>
108 </html>
109 </field>
110 <field>
111 <name>do_not_sms</name>
112 <type>boolean</type>
113 <import>true</import>
114 <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
115 <dataPattern>/^\d{1,}$/</dataPattern>
116 <default>0</default>
117 <add>3.0</add>
118 <html>
119 <type>CheckBox</type>
120 </html>
121 </field>
122 <field>
123 <name>do_not_trade</name>
124 <type>boolean</type>
125 <import>true</import>
126 <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
127 <dataPattern>/^\d{1,}$/</dataPattern>
128 <default>0</default>
129 <add>1.1</add>
130 <html>
131 <type>CheckBox</type>
132 </html>
133 </field>
134 <field>
135 <name>is_opt_out</name>
136 <type>boolean</type>
137 <title>No Bulk Emails (User Opt Out)</title>
138 <default>0</default>
139 <import>true</import>
140 <required>true</required>
141 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
142 <add>1.1</add>
143 <html>
144 <type>CheckBox</type>
145 </html>
146 </field>
147 <field>
148 <name>legal_identifier</name>
149 <type>varchar</type>
150 <length>32</length>
151 <import>true</import>
152 <headerPattern>/legal\s?id/i</headerPattern>
153 <dataPattern>/\w+?\d{5,}/</dataPattern>
154 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
155 </comment>
156 <add>1.1</add>
157 <html>
158 <type>Text</type>
159 </html>
160 </field>
161 <field>
162 <name>external_identifier</name>
163 <type>varchar</type>
164 <length>64</length>
165 <html>
166 <type>Text</type>
167 <size>8</size>
168 </html>
169
170 <import>true</import>
171 <headerPattern>/external\s?id/i</headerPattern>
172 <dataPattern>/^\d{11,}$/</dataPattern>
173 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
174 <add>1.1</add>
175 </field>
176 <index>
177 <name>UI_external_identifier</name>
178 <unique>true</unique>
179 <fieldName>external_identifier</fieldName>
180 <add>1.7</add>
181 </index>
182 <field>
183 <name>sort_name</name>
184 <title>Sort Name</title>
185 <type>varchar</type>
186 <length>128</length>
187 <html>
188 <type>Text</type>
189 <size>30</size>
190 </html>
191
192 <export>true</export>
193 <comment>Name used for sorting different contact types</comment>
194 <add>1.1</add>
195 </field>
196 <index>
197 <name>index_sort_name</name>
198 <fieldName>sort_name</fieldName>
199 <add>2.1</add>
200 </index>
201 <field>
202 <name>display_name</name>
203 <title>Display Name</title>
204 <type>varchar</type>
205 <length>128</length>
206 <html>
207 <type>Text</type>
208 <size>30</size>
209 </html>
210
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>
222 <size>30</size>
223 </html>
224
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>
238 <size>30</size>
239 </html>
240
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>
253 <html>
254 <type>Text</type>
255 <size>30</size>
256 </html>
257
258 <import>true</import>
259 <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
260 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
261 <comment>optional "home page" URL for this contact.</comment>
262 <add>1.1</add>
263 <drop>3.2</drop>
264 </field>
265 <field>
266 <name>image_URL</name>
267 <type>varchar</type>
268 <length>255</length>
269 <import>true</import>
270 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
271 <add>1.1</add>
272 <html>
273 <type>File</type>
274 <size>30</size>
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 <pseudoconstant>
326 <callback>CRM_Core_SelectValues::pmf</callback>
327 </pseudoconstant>
328 <html>
329 <type>Select</type>
330 </html>
331 </field>
332 <field>
333 <name>hash</name>
334 <title>Contact Hash</title>
335 <type>varchar</type>
336 <length>32</length>
337 <comment>Key for validating requests related to this contact.</comment>
338 <add>1.1</add>
339 <change>1.5</change>
340 <export>true</export>
341 </field>
342 <index>
343 <name>index_hash</name>
344 <fieldName>hash</fieldName>
345 <add>2.1</add>
346 </index>
347 <field>
348 <name>api_key</name>
349 <type>varchar</type>
350 <length>32</length>
351 <comment>API Key for validating requests related to this contact.</comment>
352 <add>2.2</add>
353 </field>
354 <index>
355 <name>index_api_key</name>
356 <fieldName>api_key</fieldName>
357 <add>2.1</add>
358 </index>
359 <field>
360 <name>source</name>
361 <title>Contact Source</title>
362 <uniqueName>contact_source</uniqueName>
363 <type>varchar</type>
364 <length>255</length>
365 <html>
366 <type>Text</type>
367 <size>30</size>
368 </html>
369
370 <import>true</import>
371 <headerPattern>/(C(ontact\s)?Source)$/i</headerPattern>
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>
381 <size>30</size>
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>
389 </field>
390 <index>
391 <name>index_first_name</name>
392 <fieldName>first_name</fieldName>
393 <add>1.8</add>
394 </index>
395 <field>
396 <name>middle_name</name>
397 <type>varchar</type>
398 <length>64</length>
399 <html>
400 <type>Text</type>
401 <size>30</size>
402 </html>
403 <import>true</import>
404 <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
405 <dataPattern>/^\w+$/</dataPattern>
406 <fulltext/>
407 <comment>Middle Name.</comment>
408 <add>1.1</add>
409 </field>
410 <field>
411 <name>last_name</name>
412 <type>varchar</type>
413 <length>64</length>
414 <html>
415 <type>Text</type>
416 <size>30</size>
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>
424 </field>
425 <index>
426 <name>index_last_name</name>
427 <fieldName>last_name</fieldName>
428 <add>1.8</add>
429 <html>
430 <type>Text</type>
431 </html>
432 </index>
433 <field>
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>
448 </field>
449 <index>
450 <name>UI_prefix</name>
451 <fieldName>prefix_id</fieldName>
452 <add>1.6</add>
453 </index>
454 <field>
455 <name>suffix_id</name>
456 <title>Individual Suffix</title>
457 <type>int unsigned</type>
458 <pseudoconstant>
459 <optionGroupName>individual_suffix</optionGroupName>
460 </pseudoconstant>
461 <html>
462 <type>Select</type>
463 </html>
464 <import>true</import>
465 <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
466 <headerPattern>/^suffix$/i</headerPattern>
467 <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
468 <add>1.2</add>
469 </field>
470 <index>
471 <name>UI_suffix</name>
472 <fieldName>suffix_id</fieldName>
473 <add>1.6</add>
474 </index>
475 <field>
476 <name>formal_title</name>
477 <type>varchar</type>
478 <length>64</length>
479 <import>true</import>
480 <headerPattern>/^title/i</headerPattern>
481 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
482 <add>4.5</add>
483 </field>
484 <field>
485 <name>communication_style_id</name>
486 <title>Communication Style</title>
487 <type>int unsigned</type>
488 <pseudoconstant>
489 <optionGroupName>communication_style</optionGroupName>
490 </pseudoconstant>
491 <export>true</export>
492 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
493 <add>4.4</add>
494 <html>
495 <type>Select</type>
496 </html>
497 </field>
498 <index>
499 <name>index_communication_style_id</name>
500 <fieldName>communication_style_id</fieldName>
501 <add>4.4</add>
502 </index>
503 <field>
504 <name>greeting_type</name>
505 <type>varchar</type>
506 <length>128</length>
507 <import>true</import>
508 <comment>Preferred greeting format.</comment>
509 <add>1.1</add>
510 <drop>2.2</drop>
511 </field>
512 <field>
513 <name>greeting_type_id</name>
514 <title>Greeting Type</title>
515 <type>int unsigned</type>
516 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
517 <add>2.2</add>
518 <drop>3.0</drop>
519 </field>
520 <field>
521 <name>custom_greeting</name>
522 <type>varchar</type>
523 <length>128</length>
524 <import>true</import>
525 <comment>Custom greeting message.</comment>
526 <add>1.1</add>
527 <drop>3.0</drop>
528 </field>
529 <field>
530 <name>email_greeting_id</name>
531 <type>int unsigned</type>
532 <title>Email Greeting ID</title>
533 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
534 <add>3.0</add>
535 </field>
536 <field>
537 <name>email_greeting_custom</name>
538 <type>varchar</type>
539 <length>128</length>
540 <import>true</import>
541 <export>false</export>
542 <comment>Custom Email Greeting.</comment>
543 <add>3.0</add>
544 <html>
545 <type>Text</type>
546 </html>
547 </field>
548 <field>
549 <name>email_greeting_display</name>
550 <title>Email Greeting</title>
551 <type>varchar</type>
552 <length>255</length>
553 <comment>Cache Email Greeting.</comment>
554 <add>3.0</add>
555 <html>
556 <type>Text</type>
557 </html>
558 </field>
559 <field>
560 <name>postal_greeting_id</name>
561 <type>int unsigned</type>
562 <title>Postal Greeting ID</title>
563 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
564 <add>3.0</add>
565 <html>
566 <type>Text</type>
567 </html>
568 </field>
569 <field>
570 <name>postal_greeting_custom</name>
571 <type>varchar</type>
572 <length>128</length>
573 <import>true</import>
574 <export>false</export>
575 <comment>Custom Postal greeting.</comment>
576 <add>3.0</add>
577 <html>
578 <type>Text</type>
579 </html>
580 </field>
581 <field>
582 <name>postal_greeting_display</name>
583 <title>Postal Greeting</title>
584 <type>varchar</type>
585 <length>255</length>
586 <comment>Cache Postal greeting.</comment>
587 <add>3.0</add>
588 <html>
589 <type>Text</type>
590 </html>
591 </field>
592 <field>
593 <name>addressee_id</name>
594 <type>int unsigned</type>
595 <title>Addressee ID</title>
596 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
597 <add>3.0</add>
598 </field>
599 <field>
600 <name>addressee_custom</name>
601 <type>varchar</type>
602 <length>128</length>
603 <import>true</import>
604 <export>false</export>
605 <comment>Custom Addressee.</comment>
606 <add>3.0</add>
607 <html>
608 <type>Text</type>
609 </html>
610 </field>
611 <field>
612 <name>addressee_display</name>
613 <title>Addressee</title>
614 <type>varchar</type>
615 <length>255</length>
616 <comment>Cache Addressee.</comment>
617 <add>3.0</add>
618 <html>
619 <type>Text</type>
620 </html>
621 </field>
622 <field>
623 <name>job_title</name>
624 <type>varchar</type>
625 <length>255</length>
626 <html>
627 <type>Text</type>
628 <size>30</size>
629 </html>
630 <import>true</import>
631 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
632 <dataPattern>//</dataPattern>
633 <comment>Job Title</comment>
634 <add>1.1</add>
635 </field>
636 <field>
637 <name>gender_id</name>
638 <title>Gender</title>
639 <type>int unsigned</type>
640 <pseudoconstant>
641 <optionGroupName>gender</optionGroupName>
642 </pseudoconstant>
643 <html>
644 <type>Select</type>
645 </html>
646 <headerPattern>/^gender$/i</headerPattern>
647 <comment>FK to gender ID</comment>
648 <import>true</import>
649 <add>1.2</add>
650 </field>
651 <index>
652 <name>UI_gender</name>
653 <fieldName>gender_id</fieldName>
654 <add>1.6</add>
655 <html>
656 <type>Select</type>
657 </html>
658 </index>
659 <field>
660 <name>birth_date</name>
661 <type>date</type>
662 <import>true</import>
663 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
664 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
665 <comment>Date of birth</comment>
666 <add>1.1</add>
667 <html>
668 <type>Select Date</type>
669 </html>
670 </field>
671 <field>
672 <name>is_deceased</name>
673 <title>Deceased</title>
674 <import>true</import>
675 <export>true</export>
676 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
677 <type>boolean</type>
678 <default>0</default>
679 <add>1.1</add>
680 <html>
681 <type>CheckBox</type>
682 </html>
683 </field>
684 <field>
685 <name>deceased_date</name>
686 <type>date</type>
687 <import>true</import>
688 <export>true</export>
689 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
690 <comment>Date of deceased</comment>
691 <add>1.5</add>
692 <html>
693 <type>Select Date</type>
694 </html>
695 </field>
696 <field>
697 <name>mail_to_household_id</name>
698 <title>Mail to Household ID</title>
699 <type>int unsigned</type>
700 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location. </comment>
701 <export>true</export>
702 <add>1.1</add>
703 <drop>3.3</drop>
704 </field>
705 <foreignKey>
706 <name>mail_to_household_id</name>
707 <table>civicrm_contact</table>
708 <key>id</key>
709 <add>2.1</add>
710 <onDelete>SET NULL</onDelete>
711 <drop>3.3</drop>
712 </foreignKey>
713 <field>
714 <name>household_name</name>
715 <type>varchar</type>
716 <length>128</length>
717 <html>
718 <type>Text</type>
719 <size>30</size>
720 </html>
721 <import>true</import>
722 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
723 <dataPattern>/^\w+$/</dataPattern>
724 <comment>Household Name.</comment>
725 <fulltext/>
726 <add>1.1</add>
727 </field>
728 <index>
729 <name>index_household_name</name>
730 <fieldName>household_name</fieldName>
731 <add>1.8</add>
732 </index>
733 <field>
734 <name>primary_contact_id</name>
735 <type>int unsigned</type>
736 <title>Household Primary Contact ID</title>
737 <comment>Optional FK to Primary Contact for this household.</comment>
738 <add>1.1</add>
739 <html>
740 <type>Select</type>
741 </html>
742 </field>
743 <foreignKey>
744 <name>primary_contact_id</name>
745 <table>civicrm_contact</table>
746 <key>id</key>
747 <add>1.1</add>
748 <onDelete>SET NULL</onDelete>
749 </foreignKey>
750 <field>
751 <name>organization_name</name>
752 <type>varchar</type>
753 <length>128</length>
754 <html>
755 <type>Text</type>
756 <size>30</size>
757 </html>
758 <import>true</import>
759 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
760 <dataPattern>/^\w+$/</dataPattern>
761 <comment>Organization Name.</comment>
762 <fulltext/>
763 <add>1.1</add>
764 </field>
765 <index>
766 <name>index_organization_name</name>
767 <fieldName>organization_name</fieldName>
768 <add>1.8</add>
769 </index>
770 <field>
771 <name>sic_code</name>
772 <type>varchar</type>
773 <length>8</length>
774 <import>true</import>
775 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
776 <comment>Standard Industry Classification Code.</comment>
777 <add>1.1</add>
778 <html>
779 <type>Text</type>
780 </html>
781 </field>
782 <field>
783 <name>user_unique_id</name>
784 <rule>url</rule>
785 <title>Unique ID (OpenID)</title>
786 <type>varchar</type>
787 <length>255</length>
788 <import>true</import>
789 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
790 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
791 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
792 <add>2.0</add>
793 <html>
794 <type>Text</type>
795 </html>
796 </field>
797 <field>
798 <name>employer_id</name>
799 <title>Current Employer</title>
800 <uniqueName>current_employer_id</uniqueName>
801 <type>int unsigned</type>
802 <comment>OPTIONAL FK to civicrm_contact record.</comment>
803 <export>true</export>
804 <add>2.1</add>
805 <html>
806 <type>EntityRef</type>
807 </html>
808 </field>
809 <foreignKey>
810 <name>employer_id</name>
811 <table>civicrm_contact</table>
812 <key>id</key>
813 <add>2.1</add>
814 <onDelete>SET NULL</onDelete>
815 </foreignKey>
816 <field>
817 <name>is_deleted</name>
818 <title>Contact is in Trash</title>
819 <uniqueName>contact_is_deleted</uniqueName>
820 <type>boolean</type>
821 <default>0</default>
822 <required>true</required>
823 <export>true</export>
824 <add>3.2</add>
825 <html>
826 <type>CheckBox</type>
827 </html>
828 </field>
829 <index>
830 <name>index_is_deleted</name>
831 <fieldName>is_deleted</fieldName>
832 <add>3.2</add>
833 <drop>4.4</drop>
834 </index>
835 <index>
836 <name>index_is_deleted_sort_name</name>
837 <fieldName>is_deleted</fieldName>
838 <fieldName>sort_name</fieldName>
839 <fieldName>id</fieldName>
840 <add>4.4</add>
841 </index>
842 <field>
843 <name>created_date</name>
844 <type>timestamp</type>
845 <comment>When was the contact was created.</comment>
846 <required>false</required>
847 <export>true</export>
848 <default>NULL</default>
849 <add>4.3</add>
850 </field>
851 <field>
852 <name>modified_date</name>
853 <type>timestamp</type>
854 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
855 <required>false</required>
856 <export>true</export>
857 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
858 <add>4.3</add>
859 </field>
860 </table>