Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-06-25-23-42-42
[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 <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>Source of Contact Data</title>
362 <uniqueName>contact_source</uniqueName>
363 <type>varchar</type>
364 <length>255</length>
365 <html>
366 <type>Text</type>
367 <size>BIG</size>
368 </html>
369
370 <import>true</import>
371 <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/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>BIG</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>MEDIUM</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>BIG</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 </field>
495 <index>
496 <name>index_communication_style_id</name>
497 <fieldName>communication_style_id</fieldName>
498 <add>4.4</add>
499 </index>
500 <field>
501 <name>greeting_type</name>
502 <type>varchar</type>
503 <length>128</length>
504 <import>true</import>
505 <comment>Preferred greeting format.</comment>
506 <add>1.1</add>
507 <drop>2.2</drop>
508 </field>
509 <field>
510 <name>greeting_type_id</name>
511 <title>Greeting Type</title>
512 <type>int unsigned</type>
513 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
514 <add>2.2</add>
515 <drop>3.0</drop>
516 </field>
517 <field>
518 <name>custom_greeting</name>
519 <type>varchar</type>
520 <length>128</length>
521 <import>true</import>
522 <comment>Custom greeting message.</comment>
523 <add>1.1</add>
524 <drop>3.0</drop>
525 </field>
526 <field>
527 <name>email_greeting_id</name>
528 <type>int unsigned</type>
529 <title>Email Greeting ID</title>
530 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
531 <add>3.0</add>
532 </field>
533 <field>
534 <name>email_greeting_custom</name>
535 <type>varchar</type>
536 <length>128</length>
537 <import>true</import>
538 <export>false</export>
539 <comment>Custom Email Greeting.</comment>
540 <add>3.0</add>
541 <html>
542 <type>Text</type>
543 </html>
544 </field>
545 <field>
546 <name>email_greeting_display</name>
547 <title>Email Greeting</title>
548 <type>varchar</type>
549 <length>255</length>
550 <comment>Cache Email Greeting.</comment>
551 <add>3.0</add>
552 <html>
553 <type>Text</type>
554 </html>
555 </field>
556 <field>
557 <name>postal_greeting_id</name>
558 <type>int unsigned</type>
559 <title>Postal Greeting ID</title>
560 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
561 <add>3.0</add>
562 <html>
563 <type>Text</type>
564 </html>
565 </field>
566 <field>
567 <name>postal_greeting_custom</name>
568 <type>varchar</type>
569 <length>128</length>
570 <import>true</import>
571 <export>false</export>
572 <comment>Custom Postal greeting.</comment>
573 <add>3.0</add>
574 <html>
575 <type>Text</type>
576 </html>
577 </field>
578 <field>
579 <name>postal_greeting_display</name>
580 <title>Postal Greeting</title>
581 <type>varchar</type>
582 <length>255</length>
583 <comment>Cache Postal greeting.</comment>
584 <add>3.0</add>
585 <html>
586 <type>Text</type>
587 </html>
588 </field>
589 <field>
590 <name>addressee_id</name>
591 <type>int unsigned</type>
592 <title>Addressee ID</title>
593 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
594 <add>3.0</add>
595 </field>
596 <field>
597 <name>addressee_custom</name>
598 <type>varchar</type>
599 <length>128</length>
600 <import>true</import>
601 <export>false</export>
602 <comment>Custom Addressee.</comment>
603 <add>3.0</add>
604 <html>
605 <type>Text</type>
606 </html>
607 </field>
608 <field>
609 <name>addressee_display</name>
610 <title>Addressee</title>
611 <type>varchar</type>
612 <length>255</length>
613 <comment>Cache Addressee.</comment>
614 <add>3.0</add>
615 <html>
616 <type>Text</type>
617 </html>
618 </field>
619 <field>
620 <name>job_title</name>
621 <type>varchar</type>
622 <length>255</length>
623 <html>
624 <type>Text</type>
625 <size>MEDIUM</size>
626 </html>
627 <import>true</import>
628 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
629 <dataPattern>//</dataPattern>
630 <comment>Job Title</comment>
631 <add>1.1</add>
632 </field>
633 <field>
634 <name>gender_id</name>
635 <title>Gender</title>
636 <type>int unsigned</type>
637 <pseudoconstant>
638 <optionGroupName>gender</optionGroupName>
639 </pseudoconstant>
640 <html>
641 <type>Select</type>
642 </html>
643 <headerPattern>/^gender$/i</headerPattern>
644 <comment>FK to gender ID</comment>
645 <import>true</import>
646 <add>1.2</add>
647 </field>
648 <index>
649 <name>UI_gender</name>
650 <fieldName>gender_id</fieldName>
651 <add>1.6</add>
652 <html>
653 <type>Select</type>
654 </html>
655 </index>
656 <field>
657 <name>birth_date</name>
658 <type>date</type>
659 <import>true</import>
660 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
661 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
662 <comment>Date of birth</comment>
663 <add>1.1</add>
664 <html>
665 <type>Select Date</type>
666 </html>
667 </field>
668 <field>
669 <name>is_deceased</name>
670 <title>Is Deceased</title>
671 <import>true</import>
672 <export>true</export>
673 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
674 <type>boolean</type>
675 <default>0</default>
676 <add>1.1</add>
677 <html>
678 <type>CheckBox</type>
679 </html>
680 </field>
681 <field>
682 <name>deceased_date</name>
683 <type>date</type>
684 <import>true</import>
685 <export>true</export>
686 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
687 <comment>Date of deceased</comment>
688 <add>1.5</add>
689 <html>
690 <type>Select Date</type>
691 </html>
692 </field>
693 <field>
694 <name>mail_to_household_id</name>
695 <title>Mail to Household ID</title>
696 <type>int unsigned</type>
697 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.</comment>
698 <export>true</export>
699 <add>1.1</add>
700 <drop>3.3</drop>
701 </field>
702 <foreignKey>
703 <name>mail_to_household_id</name>
704 <table>civicrm_contact</table>
705 <key>id</key>
706 <add>2.1</add>
707 <onDelete>SET NULL</onDelete>
708 <drop>3.3</drop>
709 </foreignKey>
710 <field>
711 <name>household_name</name>
712 <type>varchar</type>
713 <length>128</length>
714 <html>
715 <type>Text</type>
716 <size>BIG</size>
717 </html>
718 <import>true</import>
719 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
720 <dataPattern>/^\w+$/</dataPattern>
721 <comment>Household Name.</comment>
722 <fulltext/>
723 <add>1.1</add>
724 </field>
725 <index>
726 <name>index_household_name</name>
727 <fieldName>household_name</fieldName>
728 <add>1.8</add>
729 </index>
730 <field>
731 <name>primary_contact_id</name>
732 <type>int unsigned</type>
733 <title>Household Primary Contact ID</title>
734 <comment>Optional FK to Primary Contact for this household.</comment>
735 <add>1.1</add>
736 <html>
737 <type>Select</type>
738 </html>
739 </field>
740 <foreignKey>
741 <name>primary_contact_id</name>
742 <table>civicrm_contact</table>
743 <key>id</key>
744 <add>1.1</add>
745 <onDelete>SET NULL</onDelete>
746 </foreignKey>
747 <field>
748 <name>organization_name</name>
749 <type>varchar</type>
750 <length>128</length>
751 <html>
752 <type>Text</type>
753 <size>BIG</size>
754 </html>
755 <import>true</import>
756 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
757 <dataPattern>/^\w+$/</dataPattern>
758 <comment>Organization Name.</comment>
759 <fulltext/>
760 <add>1.1</add>
761 </field>
762 <index>
763 <name>index_organization_name</name>
764 <fieldName>organization_name</fieldName>
765 <add>1.8</add>
766 </index>
767 <field>
768 <name>sic_code</name>
769 <type>varchar</type>
770 <length>8</length>
771 <import>true</import>
772 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
773 <comment>Standard Industry Classification Code.</comment>
774 <add>1.1</add>
775 <html>
776 <type>Text</type>
777 </html>
778 </field>
779 <field>
780 <name>user_unique_id</name>
781 <rule>url</rule>
782 <title>Unique ID (OpenID)</title>
783 <type>varchar</type>
784 <length>255</length>
785 <import>true</import>
786 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
787 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
788 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
789 <add>2.0</add>
790 <html>
791 <type>Text</type>
792 </html>
793 </field>
794 <field>
795 <name>employer_id</name>
796 <title>Current Employer ID</title>
797 <uniqueName>current_employer_id</uniqueName>
798 <type>int unsigned</type>
799 <comment>OPTIONAL FK to civicrm_contact record.</comment>
800 <export>true</export>
801 <add>2.1</add>
802 <html>
803 <type>Autocomplete-Select</type>
804 </html>
805 </field>
806 <foreignKey>
807 <name>employer_id</name>
808 <table>civicrm_contact</table>
809 <key>id</key>
810 <add>2.1</add>
811 <onDelete>SET NULL</onDelete>
812 </foreignKey>
813 <field>
814 <name>is_deleted</name>
815 <title>Contact is in Trash</title>
816 <uniqueName>contact_is_deleted</uniqueName>
817 <type>boolean</type>
818 <default>0</default>
819 <required>true</required>
820 <export>true</export>
821 <add>3.2</add>
822 <html>
823 <type>CheckBox</type>
824 </html>
825 </field>
826 <index>
827 <name>index_is_deleted</name>
828 <fieldName>is_deleted</fieldName>
829 <add>3.2</add>
830 <drop>4.4</drop>
831 </index>
832 <index>
833 <name>index_is_deleted_sort_name</name>
834 <fieldName>is_deleted</fieldName>
835 <fieldName>sort_name</fieldName>
836 <fieldName>id</fieldName>
837 <add>4.4</add>
838 </index>
839 <field>
840 <name>created_date</name>
841 <type>timestamp</type>
842 <comment>When was the contact was created.</comment>
843 <required>false</required>
844 <export>true</export>
845 <default>NULL</default>
846 <add>4.3</add>
847 </field>
848 <field>
849 <name>modified_date</name>
850 <type>timestamp</type>
851 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
852 <required>false</required>
853 <export>true</export>
854 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
855 <add>4.3</add>
856 </field>
857 </table>