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