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