e6a596c6701c7ad658a4693f37a9272423e31155
[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 <serialize>SEPARATOR_BOOKEND</serialize>
68 <add>1.5</add>
69 </field>
70 <index>
71 <name>index_contact_sub_type</name>
72 <fieldName>contact_sub_type</fieldName>
73 <add>2.1</add>
74 </index>
75 <field>
76 <name>do_not_email</name>
77 <type>boolean</type>
78 <import>true</import>
79 <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
80 <dataPattern>/^\d{1,}$/</dataPattern>
81 <default>0</default>
82 <html>
83 <type>CheckBox</type>
84 </html>
85 <add>1.1</add>
86 </field>
87 <field>
88 <name>do_not_phone</name>
89 <type>boolean</type>
90 <default>0</default>
91 <import>true</import>
92 <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
93 <dataPattern>/^\d{1,}$/</dataPattern>
94 <add>1.1</add>
95 <html>
96 <type>CheckBox</type>
97 </html>
98 </field>
99 <field>
100 <name>do_not_mail</name>
101 <type>boolean</type>
102 <import>true</import>
103 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
104 <dataPattern>/^\d{1,}$/</dataPattern>
105 <default>0</default>
106 <add>1.1</add>
107 <html>
108 <type>CheckBox</type>
109 </html>
110 </field>
111 <field>
112 <name>do_not_sms</name>
113 <type>boolean</type>
114 <import>true</import>
115 <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
116 <dataPattern>/^\d{1,}$/</dataPattern>
117 <default>0</default>
118 <add>3.0</add>
119 <html>
120 <type>CheckBox</type>
121 </html>
122 </field>
123 <field>
124 <name>do_not_trade</name>
125 <type>boolean</type>
126 <import>true</import>
127 <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
128 <dataPattern>/^\d{1,}$/</dataPattern>
129 <default>0</default>
130 <add>1.1</add>
131 <html>
132 <type>CheckBox</type>
133 </html>
134 </field>
135 <field>
136 <name>is_opt_out</name>
137 <type>boolean</type>
138 <title>No Bulk Emails (User Opt Out)</title>
139 <default>0</default>
140 <import>true</import>
141 <required>true</required>
142 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
143 <add>1.1</add>
144 <html>
145 <type>CheckBox</type>
146 </html>
147 </field>
148 <field>
149 <name>legal_identifier</name>
150 <type>varchar</type>
151 <length>32</length>
152 <import>true</import>
153 <headerPattern>/legal\s?id/i</headerPattern>
154 <dataPattern>/\w+?\d{5,}/</dataPattern>
155 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
156 </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>64</length>
166 <html>
167 <type>Text</type>
168 <size>8</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>30</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>30</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>30</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>30</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>30</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>text</type>
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 <multiple>1</multiple>
293 </html>
294 <serialize>SEPARATOR_BOOKEND</serialize>
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 <html>
483 <type>Text</type>
484 </html>
485 <headerPattern>/^title/i</headerPattern>
486 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
487 <add>4.5</add>
488 </field>
489 <field>
490 <name>communication_style_id</name>
491 <title>Communication Style</title>
492 <type>int unsigned</type>
493 <pseudoconstant>
494 <optionGroupName>communication_style</optionGroupName>
495 </pseudoconstant>
496 <export>true</export>
497 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
498 <add>4.4</add>
499 <html>
500 <type>Select</type>
501 </html>
502 </field>
503 <index>
504 <name>index_communication_style_id</name>
505 <fieldName>communication_style_id</fieldName>
506 <add>4.4</add>
507 </index>
508 <field>
509 <name>greeting_type</name>
510 <type>varchar</type>
511 <length>128</length>
512 <import>true</import>
513 <comment>Preferred greeting format.</comment>
514 <add>1.1</add>
515 <drop>2.2</drop>
516 </field>
517 <field>
518 <name>greeting_type_id</name>
519 <title>Greeting Type</title>
520 <type>int unsigned</type>
521 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
522 <add>2.2</add>
523 <drop>3.0</drop>
524 </field>
525 <field>
526 <name>custom_greeting</name>
527 <type>varchar</type>
528 <length>128</length>
529 <import>true</import>
530 <comment>Custom greeting message.</comment>
531 <add>1.1</add>
532 <drop>3.0</drop>
533 </field>
534 <field>
535 <name>email_greeting_id</name>
536 <type>int unsigned</type>
537 <title>Email Greeting ID</title>
538 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
539 <add>3.0</add>
540 <pseudoconstant>
541 <optionGroupName>email_greeting</optionGroupName>
542 </pseudoconstant>
543 </field>
544 <field>
545 <name>email_greeting_custom</name>
546 <type>varchar</type>
547 <length>128</length>
548 <import>true</import>
549 <export>false</export>
550 <comment>Custom Email Greeting.</comment>
551 <add>3.0</add>
552 <html>
553 <type>Text</type>
554 </html>
555 </field>
556 <field>
557 <name>email_greeting_display</name>
558 <title>Email Greeting</title>
559 <type>varchar</type>
560 <length>255</length>
561 <comment>Cache Email Greeting.</comment>
562 <add>3.0</add>
563 <html>
564 <type>Text</type>
565 </html>
566 </field>
567 <field>
568 <name>postal_greeting_id</name>
569 <type>int unsigned</type>
570 <title>Postal Greeting ID</title>
571 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
572 <add>3.0</add>
573 <html>
574 <type>Text</type>
575 </html>
576 <pseudoconstant>
577 <optionGroupName>postal_greeting</optionGroupName>
578 </pseudoconstant>
579 </field>
580 <field>
581 <name>postal_greeting_custom</name>
582 <type>varchar</type>
583 <length>128</length>
584 <import>true</import>
585 <export>false</export>
586 <comment>Custom Postal greeting.</comment>
587 <add>3.0</add>
588 <html>
589 <type>Text</type>
590 </html>
591 </field>
592 <field>
593 <name>postal_greeting_display</name>
594 <title>Postal Greeting</title>
595 <type>varchar</type>
596 <length>255</length>
597 <comment>Cache Postal greeting.</comment>
598 <add>3.0</add>
599 <html>
600 <type>Text</type>
601 </html>
602 </field>
603 <field>
604 <name>addressee_id</name>
605 <type>int unsigned</type>
606 <title>Addressee ID</title>
607 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
608 <add>3.0</add>
609 <pseudoconstant>
610 <optionGroupName>addressee</optionGroupName>
611 </pseudoconstant>
612 </field>
613 <field>
614 <name>addressee_custom</name>
615 <type>varchar</type>
616 <length>128</length>
617 <import>true</import>
618 <export>false</export>
619 <comment>Custom Addressee.</comment>
620 <add>3.0</add>
621 <html>
622 <type>Text</type>
623 </html>
624 </field>
625 <field>
626 <name>addressee_display</name>
627 <title>Addressee</title>
628 <type>varchar</type>
629 <length>255</length>
630 <comment>Cache Addressee.</comment>
631 <add>3.0</add>
632 <html>
633 <type>Text</type>
634 </html>
635 </field>
636 <field>
637 <name>job_title</name>
638 <type>varchar</type>
639 <length>255</length>
640 <html>
641 <type>Text</type>
642 <size>30</size>
643 </html>
644 <import>true</import>
645 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
646 <dataPattern>//</dataPattern>
647 <comment>Job Title</comment>
648 <add>1.1</add>
649 </field>
650 <field>
651 <name>gender_id</name>
652 <title>Gender</title>
653 <type>int unsigned</type>
654 <pseudoconstant>
655 <optionGroupName>gender</optionGroupName>
656 </pseudoconstant>
657 <html>
658 <type>Select</type>
659 </html>
660 <headerPattern>/^gender$/i</headerPattern>
661 <comment>FK to gender ID</comment>
662 <import>true</import>
663 <add>1.2</add>
664 </field>
665 <index>
666 <name>UI_gender</name>
667 <fieldName>gender_id</fieldName>
668 <add>1.6</add>
669 <html>
670 <type>Select</type>
671 </html>
672 </index>
673 <field>
674 <name>birth_date</name>
675 <type>date</type>
676 <import>true</import>
677 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
678 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
679 <comment>Date of birth</comment>
680 <add>1.1</add>
681 <html>
682 <type>Select Date</type>
683 <formatType>birth</formatType>
684 </html>
685 </field>
686 <field>
687 <name>is_deceased</name>
688 <title>Deceased</title>
689 <import>true</import>
690 <export>true</export>
691 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
692 <type>boolean</type>
693 <default>0</default>
694 <add>1.1</add>
695 <html>
696 <type>CheckBox</type>
697 </html>
698 </field>
699 <index>
700 <name>index_is_deceased</name>
701 <fieldName>is_deceased</fieldName>
702 <add>4.7</add>
703 </index>
704 <field>
705 <name>deceased_date</name>
706 <type>date</type>
707 <import>true</import>
708 <export>true</export>
709 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
710 <comment>Date of deceased</comment>
711 <add>1.5</add>
712 <html>
713 <type>Select Date</type>
714 <formatType>birth</formatType>
715 </html>
716 </field>
717 <field>
718 <name>mail_to_household_id</name>
719 <title>Mail to Household ID</title>
720 <type>int unsigned</type>
721 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location. </comment>
722 <export>true</export>
723 <add>1.1</add>
724 <drop>3.3</drop>
725 </field>
726 <foreignKey>
727 <name>mail_to_household_id</name>
728 <table>civicrm_contact</table>
729 <key>id</key>
730 <add>2.1</add>
731 <onDelete>SET NULL</onDelete>
732 <drop>3.3</drop>
733 </foreignKey>
734 <field>
735 <name>household_name</name>
736 <type>varchar</type>
737 <length>128</length>
738 <html>
739 <type>Text</type>
740 <size>30</size>
741 </html>
742 <import>true</import>
743 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
744 <dataPattern>/^\w+$/</dataPattern>
745 <comment>Household Name.</comment>
746 <fulltext/>
747 <add>1.1</add>
748 </field>
749 <index>
750 <name>index_household_name</name>
751 <fieldName>household_name</fieldName>
752 <add>1.8</add>
753 </index>
754 <field>
755 <name>primary_contact_id</name>
756 <type>int unsigned</type>
757 <title>Household Primary Contact ID</title>
758 <comment>Optional FK to Primary Contact for this household.</comment>
759 <add>1.1</add>
760 <html>
761 <type>Select</type>
762 </html>
763 </field>
764 <foreignKey>
765 <name>primary_contact_id</name>
766 <table>civicrm_contact</table>
767 <key>id</key>
768 <add>1.1</add>
769 <onDelete>SET NULL</onDelete>
770 </foreignKey>
771 <field>
772 <name>organization_name</name>
773 <type>varchar</type>
774 <length>128</length>
775 <html>
776 <type>Text</type>
777 <size>30</size>
778 </html>
779 <import>true</import>
780 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
781 <dataPattern>/^\w+$/</dataPattern>
782 <comment>Organization Name.</comment>
783 <fulltext/>
784 <add>1.1</add>
785 </field>
786 <index>
787 <name>index_organization_name</name>
788 <fieldName>organization_name</fieldName>
789 <add>1.8</add>
790 </index>
791 <field>
792 <name>sic_code</name>
793 <type>varchar</type>
794 <length>8</length>
795 <import>true</import>
796 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
797 <comment>Standard Industry Classification Code.</comment>
798 <add>1.1</add>
799 <html>
800 <type>Text</type>
801 </html>
802 </field>
803 <field>
804 <name>user_unique_id</name>
805 <rule>url</rule>
806 <title>Unique ID (OpenID)</title>
807 <type>varchar</type>
808 <length>255</length>
809 <import>true</import>
810 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
811 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
812 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
813 <add>2.0</add>
814 <html>
815 <type>Text</type>
816 </html>
817 </field>
818 <field>
819 <name>employer_id</name>
820 <title>Current Employer</title>
821 <uniqueName>current_employer_id</uniqueName>
822 <type>int unsigned</type>
823 <comment>OPTIONAL FK to civicrm_contact record.</comment>
824 <export>true</export>
825 <add>2.1</add>
826 <html>
827 <type>EntityRef</type>
828 </html>
829 </field>
830 <foreignKey>
831 <name>employer_id</name>
832 <table>civicrm_contact</table>
833 <key>id</key>
834 <add>2.1</add>
835 <onDelete>SET NULL</onDelete>
836 </foreignKey>
837 <field>
838 <name>is_deleted</name>
839 <title>Contact is in Trash</title>
840 <uniqueName>contact_is_deleted</uniqueName>
841 <type>boolean</type>
842 <default>0</default>
843 <required>true</required>
844 <export>true</export>
845 <add>3.2</add>
846 <html>
847 <type>CheckBox</type>
848 </html>
849 </field>
850 <index>
851 <name>index_is_deleted</name>
852 <fieldName>is_deleted</fieldName>
853 <add>3.2</add>
854 <drop>4.4</drop>
855 </index>
856 <index>
857 <name>index_is_deleted_sort_name</name>
858 <fieldName>is_deleted</fieldName>
859 <fieldName>sort_name</fieldName>
860 <fieldName>id</fieldName>
861 <add>4.4</add>
862 </index>
863 <field>
864 <name>created_date</name>
865 <type>timestamp</type>
866 <comment>When was the contact was created.</comment>
867 <required>false</required>
868 <export>true</export>
869 <default>NULL</default>
870 <add>4.3</add>
871 </field>
872 <field>
873 <name>modified_date</name>
874 <type>timestamp</type>
875 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
876 <required>false</required>
877 <export>true</export>
878 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
879 <add>4.3</add>
880 </field>
881 </table>