Merge pull request #16181 from civicrm/5.21
[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 <contactType>null</contactType>
43 </field>
44 <index>
45 <name>index_contact_type</name>
46 <fieldName>contact_type</fieldName>
47 <add>2.1</add>
48 </index>
49 <field>
50 <name>contact_sub_type</name>
51 <title>Contact Subtype</title>
52 <type>varchar</type>
53 <length>255</length>
54 <export>true</export>
55 <import>true</import>
56 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i</headerPattern>
57 <comment>May be used to over-ride contact view and edit templates.</comment>
58 <pseudoconstant>
59 <table>civicrm_contact_type</table>
60 <keyColumn>name</keyColumn>
61 <labelColumn>label</labelColumn>
62 <condition>parent_id IS NOT NULL</condition>
63 </pseudoconstant>
64 <html>
65 <type>Select</type>
66 <multiple>1</multiple>
67 </html>
68 <serialize>SEPARATOR_BOOKEND</serialize>
69 <add>1.5</add>
70 </field>
71 <index>
72 <name>index_contact_sub_type</name>
73 <fieldName>contact_sub_type</fieldName>
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>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 <import>true</import>
255 <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
256 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
257 <comment>optional "home page" URL for this contact.</comment>
258 <add>1.1</add>
259 <drop>3.2</drop>
260 </field>
261 <field>
262 <name>image_URL</name>
263 <type>text</type>
264 <import>true</import>
265 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
266 <add>1.1</add>
267 <html>
268 <type>File</type>
269 <size>30</size>
270 </html>
271 </field>
272 <field>
273 <name>preferred_communication_method</name>
274 <title>Preferred Communication Method</title>
275 <type>varchar</type>
276 <length>255</length>
277 <import>true</import>
278 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
279 <dataPattern>/^\w+$/</dataPattern>
280 <comment>What is the preferred mode of communication.</comment>
281 <add>1.1</add>
282 <pseudoconstant>
283 <optionGroupName>preferred_communication_method</optionGroupName>
284 </pseudoconstant>
285 <html>
286 <type>Select</type>
287 <multiple>1</multiple>
288 </html>
289 <serialize>SEPARATOR_BOOKEND</serialize>
290 </field>
291 <index>
292 <name>index_preferred_communication_method</name>
293 <fieldName>preferred_communication_method</fieldName>
294 <add>1.6</add>
295 </index>
296 <field>
297 <name>preferred_language</name>
298 <title>Preferred Language</title>
299 <type>varchar</type>
300 <length>5</length>
301 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
302 <headerPattern>/^lang/i</headerPattern>
303 <import>true</import>
304 <pseudoconstant>
305 <optionGroupName>languages</optionGroupName>
306 <keyColumn>name</keyColumn>
307 </pseudoconstant>
308 <html>
309 <type>Select</type>
310 </html>
311 <add>3.2</add>
312 </field>
313 <field>
314 <name>preferred_mail_format</name>
315 <type>varchar</type>
316 <length>8</length>
317 <default>"Both"</default>
318 <import>true</import>
319 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
320 <comment>What is the preferred mode of sending an email.</comment>
321 <add>1.1</add>
322 <pseudoconstant>
323 <callback>CRM_Core_SelectValues::pmf</callback>
324 </pseudoconstant>
325 <html>
326 <type>Select</type>
327 </html>
328 </field>
329 <field>
330 <name>hash</name>
331 <title>Contact Hash</title>
332 <type>varchar</type>
333 <length>32</length>
334 <comment>Key for validating requests related to this contact.</comment>
335 <add>1.1</add>
336 <change>1.5</change>
337 <export>true</export>
338 </field>
339 <index>
340 <name>index_hash</name>
341 <fieldName>hash</fieldName>
342 <add>2.1</add>
343 </index>
344 <field>
345 <name>api_key</name>
346 <type>varchar</type>
347 <length>32</length>
348 <comment>API Key for validating requests related to this contact.</comment>
349 <add>2.2</add>
350 <permission>
351 <or>administer CiviCRM, edit api keys</or>
352 </permission>
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 <contactType>Individual</contactType>
390 </field>
391 <index>
392 <name>index_first_name</name>
393 <fieldName>first_name</fieldName>
394 <add>1.8</add>
395 </index>
396 <field>
397 <name>middle_name</name>
398 <type>varchar</type>
399 <length>64</length>
400 <html>
401 <type>Text</type>
402 <size>30</size>
403 </html>
404 <import>true</import>
405 <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
406 <dataPattern>/^\w+$/</dataPattern>
407 <fulltext/>
408 <comment>Middle Name.</comment>
409 <add>1.1</add>
410 <contactType>Individual</contactType>
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 <contactType>Individual</contactType>
427 </field>
428 <index>
429 <name>index_last_name</name>
430 <fieldName>last_name</fieldName>
431 <add>1.8</add>
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 <contactType>Individual</contactType>
449 </field>
450 <index>
451 <name>UI_prefix</name>
452 <fieldName>prefix_id</fieldName>
453 <add>1.6</add>
454 </index>
455 <field>
456 <name>suffix_id</name>
457 <title>Individual Suffix</title>
458 <type>int unsigned</type>
459 <pseudoconstant>
460 <optionGroupName>individual_suffix</optionGroupName>
461 </pseudoconstant>
462 <html>
463 <type>Select</type>
464 </html>
465 <import>true</import>
466 <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
467 <headerPattern>/^suffix$/i</headerPattern>
468 <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
469 <add>1.2</add>
470 <contactType>Individual</contactType>
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 <contactType>Individual</contactType>
489 </field>
490 <field>
491 <name>communication_style_id</name>
492 <title>Communication Style</title>
493 <type>int unsigned</type>
494 <pseudoconstant>
495 <optionGroupName>communication_style</optionGroupName>
496 </pseudoconstant>
497 <export>true</export>
498 <import>true</import>
499 <headerPattern>/style/i</headerPattern>
500 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
501 <add>4.4</add>
502 <html>
503 <type>Select</type>
504 </html>
505 </field>
506 <index>
507 <name>index_communication_style_id</name>
508 <fieldName>communication_style_id</fieldName>
509 <add>4.4</add>
510 </index>
511 <field>
512 <name>greeting_type</name>
513 <type>varchar</type>
514 <length>128</length>
515 <import>true</import>
516 <comment>Preferred greeting format.</comment>
517 <add>1.1</add>
518 <drop>2.2</drop>
519 </field>
520 <field>
521 <name>greeting_type_id</name>
522 <title>Greeting Type</title>
523 <type>int unsigned</type>
524 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
525 <add>2.2</add>
526 <drop>3.0</drop>
527 </field>
528 <field>
529 <name>custom_greeting</name>
530 <type>varchar</type>
531 <length>128</length>
532 <import>true</import>
533 <comment>Custom greeting message.</comment>
534 <add>1.1</add>
535 <drop>3.0</drop>
536 </field>
537 <field>
538 <name>email_greeting_id</name>
539 <type>int unsigned</type>
540 <title>Email Greeting ID</title>
541 <export>true</export>
542 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
543 <add>3.0</add>
544 <html>
545 <type>Select</type>
546 </html>
547 <pseudoconstant>
548 <optionGroupName>email_greeting</optionGroupName>
549 </pseudoconstant>
550 </field>
551 <field>
552 <name>email_greeting_custom</name>
553 <type>varchar</type>
554 <length>128</length>
555 <import>true</import>
556 <export>false</export>
557 <comment>Custom Email Greeting.</comment>
558 <add>3.0</add>
559 <html>
560 <type>Text</type>
561 </html>
562 </field>
563 <field>
564 <name>email_greeting_display</name>
565 <title>Email Greeting</title>
566 <type>varchar</type>
567 <length>255</length>
568 <comment>Cache Email Greeting.</comment>
569 <add>3.0</add>
570 </field>
571 <field>
572 <name>postal_greeting_id</name>
573 <type>int unsigned</type>
574 <title>Postal Greeting ID</title>
575 <export>true</export>
576 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
577 <add>3.0</add>
578 <html>
579 <type>Select</type>
580 </html>
581 <pseudoconstant>
582 <optionGroupName>postal_greeting</optionGroupName>
583 </pseudoconstant>
584 </field>
585 <field>
586 <name>postal_greeting_custom</name>
587 <type>varchar</type>
588 <length>128</length>
589 <import>true</import>
590 <export>false</export>
591 <comment>Custom Postal greeting.</comment>
592 <add>3.0</add>
593 <html>
594 <type>Text</type>
595 </html>
596 </field>
597 <field>
598 <name>postal_greeting_display</name>
599 <title>Postal Greeting</title>
600 <type>varchar</type>
601 <length>255</length>
602 <comment>Cache Postal greeting.</comment>
603 <add>3.0</add>
604 </field>
605 <field>
606 <name>addressee_id</name>
607 <type>int unsigned</type>
608 <title>Addressee ID</title>
609 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
610 <add>3.0</add>
611 <export>true</export>
612 <html>
613 <type>Select</type>
614 </html>
615 <pseudoconstant>
616 <optionGroupName>addressee</optionGroupName>
617 </pseudoconstant>
618 </field>
619 <field>
620 <name>addressee_custom</name>
621 <type>varchar</type>
622 <length>128</length>
623 <import>true</import>
624 <export>false</export>
625 <comment>Custom Addressee.</comment>
626 <add>3.0</add>
627 <html>
628 <type>Text</type>
629 </html>
630 </field>
631 <field>
632 <name>addressee_display</name>
633 <title>Addressee</title>
634 <type>varchar</type>
635 <length>255</length>
636 <comment>Cache Addressee.</comment>
637 <add>3.0</add>
638 </field>
639 <field>
640 <name>job_title</name>
641 <type>varchar</type>
642 <length>255</length>
643 <html>
644 <type>Text</type>
645 <size>30</size>
646 </html>
647 <import>true</import>
648 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
649 <dataPattern>//</dataPattern>
650 <comment>Job Title</comment>
651 <add>1.1</add>
652 <contactType>Individual</contactType>
653 </field>
654 <field>
655 <name>gender_id</name>
656 <title>Gender</title>
657 <type>int unsigned</type>
658 <pseudoconstant>
659 <optionGroupName>gender</optionGroupName>
660 </pseudoconstant>
661 <html>
662 <type>Select</type>
663 </html>
664 <headerPattern>/^gender$/i</headerPattern>
665 <comment>FK to gender ID</comment>
666 <import>true</import>
667 <add>1.2</add>
668 <contactType>Individual</contactType>
669 </field>
670 <index>
671 <name>UI_gender</name>
672 <fieldName>gender_id</fieldName>
673 <add>1.6</add>
674 </index>
675 <field>
676 <name>birth_date</name>
677 <type>date</type>
678 <import>true</import>
679 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
680 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
681 <comment>Date of birth</comment>
682 <add>1.1</add>
683 <html>
684 <type>Select Date</type>
685 <formatType>birth</formatType>
686 </html>
687 <contactType>Individual</contactType>
688 </field>
689 <field>
690 <name>is_deceased</name>
691 <title>Deceased</title>
692 <import>true</import>
693 <export>true</export>
694 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
695 <type>boolean</type>
696 <default>0</default>
697 <add>1.1</add>
698 <html>
699 <type>CheckBox</type>
700 </html>
701 <contactType>Individual</contactType>
702 </field>
703 <index>
704 <name>index_is_deceased</name>
705 <fieldName>is_deceased</fieldName>
706 <add>4.7</add>
707 </index>
708 <field>
709 <name>deceased_date</name>
710 <type>date</type>
711 <import>true</import>
712 <export>true</export>
713 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
714 <comment>Date of deceased</comment>
715 <add>1.5</add>
716 <html>
717 <type>Select Date</type>
718 <formatType>birth</formatType>
719 </html>
720 <contactType>Individual</contactType>
721 </field>
722 <field>
723 <name>mail_to_household_id</name>
724 <title>Mail to Household ID</title>
725 <type>int unsigned</type>
726 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location. </comment>
727 <export>true</export>
728 <add>1.1</add>
729 <drop>3.3</drop>
730 </field>
731 <foreignKey>
732 <name>mail_to_household_id</name>
733 <table>civicrm_contact</table>
734 <key>id</key>
735 <add>2.1</add>
736 <onDelete>SET NULL</onDelete>
737 <drop>3.3</drop>
738 </foreignKey>
739 <field>
740 <name>household_name</name>
741 <type>varchar</type>
742 <length>128</length>
743 <html>
744 <type>Text</type>
745 <size>30</size>
746 </html>
747 <import>true</import>
748 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
749 <dataPattern>/^\w+$/</dataPattern>
750 <comment>Household Name.</comment>
751 <fulltext/>
752 <add>1.1</add>
753 <contactType>Household</contactType>
754 </field>
755 <index>
756 <name>index_household_name</name>
757 <fieldName>household_name</fieldName>
758 <add>1.8</add>
759 </index>
760 <field>
761 <name>primary_contact_id</name>
762 <type>int unsigned</type>
763 <title>Household Primary Contact ID</title>
764 <comment>Optional FK to Primary Contact for this household.</comment>
765 <add>1.1</add>
766 <contactType>Household</contactType>
767 </field>
768 <foreignKey>
769 <name>primary_contact_id</name>
770 <table>civicrm_contact</table>
771 <key>id</key>
772 <add>1.1</add>
773 <onDelete>SET NULL</onDelete>
774 </foreignKey>
775 <field>
776 <name>organization_name</name>
777 <type>varchar</type>
778 <length>128</length>
779 <html>
780 <type>Text</type>
781 <size>30</size>
782 </html>
783 <import>true</import>
784 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
785 <dataPattern>/^\w+$/</dataPattern>
786 <comment>Organization Name.</comment>
787 <fulltext/>
788 <add>1.1</add>
789 <contactType>Organization</contactType>
790 </field>
791 <index>
792 <name>index_organization_name</name>
793 <fieldName>organization_name</fieldName>
794 <add>1.8</add>
795 </index>
796 <field>
797 <name>sic_code</name>
798 <type>varchar</type>
799 <length>8</length>
800 <import>true</import>
801 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
802 <comment>Standard Industry Classification Code.</comment>
803 <add>1.1</add>
804 <html>
805 <type>Text</type>
806 </html>
807 <contactType>Organization</contactType>
808 </field>
809 <field>
810 <name>user_unique_id</name>
811 <rule>url</rule>
812 <title>Unique ID (OpenID)</title>
813 <type>varchar</type>
814 <length>255</length>
815 <import>true</import>
816 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
817 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
818 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
819 <add>2.0</add>
820 <html>
821 <type>Text</type>
822 </html>
823 </field>
824 <field>
825 <name>employer_id</name>
826 <title>Current Employer</title>
827 <uniqueName>current_employer_id</uniqueName>
828 <type>int unsigned</type>
829 <comment>OPTIONAL FK to civicrm_contact record.</comment>
830 <export>true</export>
831 <add>2.1</add>
832 <html>
833 <type>EntityRef</type>
834 </html>
835 <contactType>Individual</contactType>
836 </field>
837 <foreignKey>
838 <name>employer_id</name>
839 <table>civicrm_contact</table>
840 <key>id</key>
841 <add>2.1</add>
842 <onDelete>SET NULL</onDelete>
843 </foreignKey>
844 <field>
845 <name>is_deleted</name>
846 <title>Contact is in Trash</title>
847 <uniqueName>contact_is_deleted</uniqueName>
848 <type>boolean</type>
849 <default>0</default>
850 <required>true</required>
851 <export>true</export>
852 <add>3.2</add>
853 <html>
854 <type>CheckBox</type>
855 </html>
856 </field>
857 <index>
858 <name>index_is_deleted</name>
859 <fieldName>is_deleted</fieldName>
860 <add>3.2</add>
861 <drop>4.4</drop>
862 </index>
863 <index>
864 <name>index_is_deleted_sort_name</name>
865 <fieldName>is_deleted</fieldName>
866 <fieldName>sort_name</fieldName>
867 <fieldName>id</fieldName>
868 <add>4.4</add>
869 </index>
870 <field>
871 <name>created_date</name>
872 <type>timestamp</type>
873 <comment>When was the contact was created.</comment>
874 <required>false</required>
875 <export>true</export>
876 <default>NULL</default>
877 <add>4.3</add>
878 </field>
879 <index>
880 <name>index_created_date</name>
881 <fieldName>created_date</fieldName>
882 <add>5.18</add>
883 </index>
884 <field>
885 <name>modified_date</name>
886 <type>timestamp</type>
887 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
888 <required>false</required>
889 <export>true</export>
890 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
891 <add>4.3</add>
892 </field>
893 <index>
894 <name>index_modified_date</name>
895 <fieldName>modified_date</fieldName>
896 <add>5.18</add>
897 </index>
898 </table>