Merge pull request #22850 from ixiam/dev_Issue#3080
[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 <description>Individuals, organizations, households, etc.</description>
9 <add>1.1</add>
10 <log>true</log>
11 <icon>fa-address-book-o</icon>
12 <labelField>display_name</labelField>
13 <paths>
14 <add>civicrm/contact/add?reset=1&amp;ct=[contact_type]</add>
15 <view>civicrm/contact/view?reset=1&amp;cid=[id]</view>
16 <update>civicrm/contact/add?reset=1&amp;action=update&amp;cid=[id]</update>
17 <delete>civicrm/contact/view/delete?reset=1&amp;delete=1&amp;cid=[id]</delete>
18 </paths>
19 <field>
20 <name>id</name>
21 <type>int unsigned</type>
22 <title>Contact ID</title>
23 <import>true</import>
24 <headerPattern>/internal|contact?|id$/i</headerPattern>
25 <required>true</required>
26 <comment>Unique Contact ID</comment>
27 <html>
28 <type>Number</type>
29 </html>
30 <add>1.1</add>
31 </field>
32 <primaryKey>
33 <name>id</name>
34 <autoincrement>true</autoincrement>
35 </primaryKey>
36 <field>
37 <name>contact_type</name>
38 <title>Contact Type</title>
39 <type>varchar</type>
40 <length>64</length>
41 <comment>Type of Contact.</comment>
42 <export>true</export>
43 <pseudoconstant>
44 <table>civicrm_contact_type</table>
45 <keyColumn>name</keyColumn>
46 <labelColumn>label</labelColumn>
47 <condition>parent_id IS NULL</condition>
48 </pseudoconstant>
49 <html>
50 <type>Select</type>
51 </html>
52 <readonly>true</readonly>
53 <add>1.1</add>
54 <change>3.1</change>
55 <contactType>null</contactType>
56 </field>
57 <index>
58 <name>index_contact_type</name>
59 <fieldName>contact_type</fieldName>
60 <add>2.1</add>
61 </index>
62 <field>
63 <name>contact_sub_type</name>
64 <title>Contact Subtype</title>
65 <type>varchar</type>
66 <length>255</length>
67 <export>true</export>
68 <import>true</import>
69 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i</headerPattern>
70 <comment>May be used to over-ride contact view and edit templates.</comment>
71 <pseudoconstant>
72 <table>civicrm_contact_type</table>
73 <keyColumn>name</keyColumn>
74 <labelColumn>label</labelColumn>
75 <condition>parent_id IS NOT NULL</condition>
76 </pseudoconstant>
77 <html>
78 <type>Select</type>
79 <multiple>1</multiple>
80 </html>
81 <serialize>SEPARATOR_BOOKEND</serialize>
82 <add>1.5</add>
83 </field>
84 <index>
85 <name>index_contact_sub_type</name>
86 <fieldName>contact_sub_type</fieldName>
87 <add>2.1</add>
88 </index>
89 <field>
90 <name>do_not_email</name>
91 <type>boolean</type>
92 <import>true</import>
93 <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
94 <dataPattern>/^\d{1,}$/</dataPattern>
95 <default>0</default>
96 <required>true</required>
97 <html>
98 <type>CheckBox</type>
99 <label>Do Not Email</label>
100 </html>
101 <add>1.1</add>
102 </field>
103 <field>
104 <name>do_not_phone</name>
105 <type>boolean</type>
106 <default>0</default>
107 <required>true</required>
108 <import>true</import>
109 <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
110 <dataPattern>/^\d{1,}$/</dataPattern>
111 <add>1.1</add>
112 <html>
113 <type>CheckBox</type>
114 <label>Do Not Phone</label>
115 </html>
116 </field>
117 <field>
118 <name>do_not_mail</name>
119 <type>boolean</type>
120 <import>true</import>
121 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
122 <dataPattern>/^\d{1,}$/</dataPattern>
123 <default>0</default>
124 <required>true</required>
125 <add>1.1</add>
126 <html>
127 <type>CheckBox</type>
128 <label>Do Not Mail</label>
129 </html>
130 </field>
131 <field>
132 <name>do_not_sms</name>
133 <type>boolean</type>
134 <import>true</import>
135 <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
136 <dataPattern>/^\d{1,}$/</dataPattern>
137 <default>0</default>
138 <required>true</required>
139 <add>3.0</add>
140 <html>
141 <type>CheckBox</type>
142 <label>Do Not Sms</label>
143 </html>
144 </field>
145 <field>
146 <name>do_not_trade</name>
147 <type>boolean</type>
148 <import>true</import>
149 <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
150 <dataPattern>/^\d{1,}$/</dataPattern>
151 <default>0</default>
152 <required>true</required>
153 <add>1.1</add>
154 <html>
155 <type>CheckBox</type>
156 <label>Do Not Trade</label>
157 </html>
158 </field>
159 <field>
160 <name>is_opt_out</name>
161 <type>boolean</type>
162 <title>No Bulk Emails (User Opt Out)</title>
163 <default>0</default>
164 <required>true</required>
165 <import>true</import>
166 <required>true</required>
167 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
168 <add>1.1</add>
169 <html>
170 <type>CheckBox</type>
171 <label>Is Opt Out</label>
172 </html>
173 </field>
174 <field>
175 <name>legal_identifier</name>
176 <type>varchar</type>
177 <length>32</length>
178 <import>true</import>
179 <headerPattern>/legal\s?id/i</headerPattern>
180 <dataPattern>/\w+?\d{5,}/</dataPattern>
181 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.</comment>
182 <add>1.1</add>
183 <html>
184 <type>Text</type>
185 <label>Legal Identifier</label>
186 </html>
187 </field>
188 <field>
189 <name>external_identifier</name>
190 <type>varchar</type>
191 <length>64</length>
192 <html>
193 <type>Text</type>
194 <size>8</size>
195 <label>External Identifier</label>
196 </html>
197
198 <import>true</import>
199 <headerPattern>/external\s?id/i</headerPattern>
200 <dataPattern>/^\d{11,}$/</dataPattern>
201 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
202 <add>1.1</add>
203 </field>
204 <index>
205 <name>UI_external_identifier</name>
206 <unique>true</unique>
207 <fieldName>external_identifier</fieldName>
208 <add>1.7</add>
209 </index>
210 <field>
211 <name>sort_name</name>
212 <title>Sort Name</title>
213 <type>varchar</type>
214 <length>128</length>
215 <html>
216 <type>Text</type>
217 <size>30</size>
218 </html>
219 <readonly>true</readonly>
220 <export>true</export>
221 <comment>Name used for sorting different contact types</comment>
222 <add>1.1</add>
223 </field>
224 <index>
225 <name>index_sort_name</name>
226 <fieldName>sort_name</fieldName>
227 <add>2.1</add>
228 </index>
229 <field>
230 <name>display_name</name>
231 <title>Display Name</title>
232 <type>varchar</type>
233 <length>128</length>
234 <html>
235 <type>Text</type>
236 <size>30</size>
237 </html>
238 <readonly>true</readonly>
239 <export>true</export>
240 <comment>Formatted name representing preferred format for display/print/other output.</comment>
241 <add>1.1</add>
242 </field>
243 <field>
244 <name>nick_name</name>
245 <title>Nickname</title>
246 <type>varchar</type>
247 <length>128</length>
248 <html>
249 <type>Text</type>
250 <size>30</size>
251 </html>
252
253 <import>true</import>
254 <headerPattern>/n(ick\s)name|nick$/i</headerPattern>
255 <dataPattern>/^\w+$/</dataPattern>
256 <comment>Nickname.</comment>
257 <fulltext/>
258 <add>1.1</add>
259 </field>
260 <field>
261 <name>legal_name</name>
262 <type>varchar</type>
263 <length>128</length>
264 <html>
265 <type>Text</type>
266 <size>30</size>
267 <label>Legal Name</label>
268 </html>
269 <contactType>Organization</contactType>
270 <import>true</import>
271 <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
272 <comment>Legal Name.</comment>
273 <fulltext/>
274 <add>1.1</add>
275 </field>
276 <field>
277 <name>image_URL</name>
278 <type>text</type>
279 <import>true</import>
280 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
281 <add>1.1</add>
282 <html>
283 <type>File</type>
284 <size>30</size>
285 <label>Image URL</label>
286 </html>
287 </field>
288 <field>
289 <name>preferred_communication_method</name>
290 <title>Preferred Communication Method</title>
291 <type>varchar</type>
292 <length>255</length>
293 <import>true</import>
294 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
295 <dataPattern>/^\w+$/</dataPattern>
296 <comment>What is the preferred mode of communication.</comment>
297 <add>1.1</add>
298 <pseudoconstant>
299 <optionGroupName>preferred_communication_method</optionGroupName>
300 </pseudoconstant>
301 <html>
302 <type>Select</type>
303 <multiple>1</multiple>
304 </html>
305 <serialize>SEPARATOR_BOOKEND</serialize>
306 </field>
307 <index>
308 <name>index_preferred_communication_method</name>
309 <fieldName>preferred_communication_method</fieldName>
310 <add>1.6</add>
311 </index>
312 <field>
313 <name>preferred_language</name>
314 <title>Preferred Language</title>
315 <type>varchar</type>
316 <length>5</length>
317 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
318 <headerPattern>/^lang/i</headerPattern>
319 <import>true</import>
320 <pseudoconstant>
321 <optionGroupName>languages</optionGroupName>
322 <keyColumn>name</keyColumn>
323 </pseudoconstant>
324 <html>
325 <type>Select</type>
326 </html>
327 <add>3.2</add>
328 </field>
329 <field>
330 <name>preferred_mail_format</name>
331 <type>varchar</type>
332 <length>8</length>
333 <default>"Both"</default>
334 <import>true</import>
335 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
336 <comment>What is the preferred mode of sending an email.</comment>
337 <add>1.1</add>
338 <pseudoconstant>
339 <callback>CRM_Core_SelectValues::pmf</callback>
340 </pseudoconstant>
341 <html>
342 <type>Select</type>
343 <label>Preferred Mail Format</label>
344 </html>
345 </field>
346 <field>
347 <name>hash</name>
348 <title>Contact Hash</title>
349 <type>varchar</type>
350 <length>32</length>
351 <comment>Key for validating requests related to this contact.</comment>
352 <add>1.1</add>
353 <change>1.5</change>
354 <export>true</export>
355 <readonly>true</readonly>
356 </field>
357 <index>
358 <name>index_hash</name>
359 <fieldName>hash</fieldName>
360 <add>2.1</add>
361 </index>
362 <field>
363 <name>api_key</name>
364 <type>varchar</type>
365 <length>32</length>
366 <comment>API Key for validating requests related to this contact.</comment>
367 <html>
368 <label>API KEY</label>
369 </html>
370 <add>2.2</add>
371 <readonly>true</readonly>
372 <permission>
373 <or>administer CiviCRM, edit api keys</or>
374 </permission>
375 </field>
376 <index>
377 <name>index_api_key</name>
378 <fieldName>api_key</fieldName>
379 <add>2.1</add>
380 </index>
381 <field>
382 <name>source</name>
383 <title>Contact Source</title>
384 <uniqueName>contact_source</uniqueName>
385 <type>varchar</type>
386 <length>255</length>
387 <html>
388 <type>Text</type>
389 <size>30</size>
390 </html>
391
392 <import>true</import>
393 <headerPattern>/(C(ontact\s)?Source)$/i</headerPattern>
394 <comment>where contact come from, e.g. import, donate module insert...</comment>
395 <add>1.1</add>
396 </field>
397 <field>
398 <name>first_name</name>
399 <type>varchar</type>
400 <length>64</length>
401 <html>
402 <type>Text</type>
403 <size>30</size>
404 <label>First Name</label>
405 </html>
406 <import>true</import>
407 <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
408 <dataPattern>/^\w+$/</dataPattern>
409 <fulltext/>
410 <comment>First Name.</comment>
411 <add>1.1</add>
412 <contactType>Individual</contactType>
413 </field>
414 <index>
415 <name>index_first_name</name>
416 <fieldName>first_name</fieldName>
417 <add>1.8</add>
418 </index>
419 <field>
420 <name>middle_name</name>
421 <type>varchar</type>
422 <length>64</length>
423 <html>
424 <type>Text</type>
425 <size>30</size>
426 <label>Middle Name</label>
427 </html>
428 <import>true</import>
429 <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
430 <dataPattern>/^\w+$/</dataPattern>
431 <fulltext/>
432 <comment>Middle Name.</comment>
433 <add>1.1</add>
434 <contactType>Individual</contactType>
435 </field>
436 <field>
437 <name>last_name</name>
438 <type>varchar</type>
439 <length>64</length>
440 <html>
441 <type>Text</type>
442 <size>30</size>
443 <label>Last Name</label>
444 </html>
445 <import>true</import>
446 <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
447 <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
448 <comment>Last Name.</comment>
449 <fulltext/>
450 <add>1.1</add>
451 <contactType>Individual</contactType>
452 </field>
453 <index>
454 <name>index_last_name</name>
455 <fieldName>last_name</fieldName>
456 <add>1.8</add>
457 </index>
458 <field>
459 <name>prefix_id</name>
460 <title>Individual Prefix</title>
461 <type>int unsigned</type>
462 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
463 <pseudoconstant>
464 <optionGroupName>individual_prefix</optionGroupName>
465 </pseudoconstant>
466 <html>
467 <type>Select</type>
468 </html>
469 <headerPattern>/^(prefix|title)/i</headerPattern>
470 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
471 <import>true</import>
472 <add>1.2</add>
473 <contactType>Individual</contactType>
474 </field>
475 <index>
476 <name>UI_prefix</name>
477 <fieldName>prefix_id</fieldName>
478 <add>1.6</add>
479 </index>
480 <field>
481 <name>suffix_id</name>
482 <title>Individual Suffix</title>
483 <type>int unsigned</type>
484 <pseudoconstant>
485 <optionGroupName>individual_suffix</optionGroupName>
486 </pseudoconstant>
487 <html>
488 <type>Select</type>
489 </html>
490 <import>true</import>
491 <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
492 <headerPattern>/^suffix$/i</headerPattern>
493 <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
494 <add>1.2</add>
495 <contactType>Individual</contactType>
496 </field>
497 <index>
498 <name>UI_suffix</name>
499 <fieldName>suffix_id</fieldName>
500 <add>1.6</add>
501 </index>
502 <field>
503 <name>formal_title</name>
504 <type>varchar</type>
505 <length>64</length>
506 <import>true</import>
507 <html>
508 <type>Text</type>
509 <label>Formal Title</label>
510 </html>
511 <headerPattern>/^title/i</headerPattern>
512 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
513 <add>4.5</add>
514 <contactType>Individual</contactType>
515 </field>
516 <field>
517 <name>communication_style_id</name>
518 <title>Communication Style</title>
519 <type>int unsigned</type>
520 <pseudoconstant>
521 <optionGroupName>communication_style</optionGroupName>
522 </pseudoconstant>
523 <export>true</export>
524 <import>true</import>
525 <headerPattern>/style/i</headerPattern>
526 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
527 <add>4.4</add>
528 <html>
529 <type>Select</type>
530 </html>
531 </field>
532 <index>
533 <name>index_communication_style_id</name>
534 <fieldName>communication_style_id</fieldName>
535 <add>4.4</add>
536 </index>
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 <label>Email Greeting Custom</label>
562 </html>
563 </field>
564 <field>
565 <name>email_greeting_display</name>
566 <title>Email Greeting</title>
567 <type>varchar</type>
568 <length>255</length>
569 <comment>Cache Email Greeting.</comment>
570 <readonly>true</readonly>
571 <add>3.0</add>
572 </field>
573 <field>
574 <name>postal_greeting_id</name>
575 <type>int unsigned</type>
576 <title>Postal Greeting ID</title>
577 <export>true</export>
578 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
579 <add>3.0</add>
580 <html>
581 <type>Select</type>
582 </html>
583 <pseudoconstant>
584 <optionGroupName>postal_greeting</optionGroupName>
585 </pseudoconstant>
586 </field>
587 <field>
588 <name>postal_greeting_custom</name>
589 <type>varchar</type>
590 <length>128</length>
591 <import>true</import>
592 <export>false</export>
593 <comment>Custom Postal greeting.</comment>
594 <add>3.0</add>
595 <html>
596 <type>Text</type>
597 <label>Postal Greeting Custom</label>
598 </html>
599 </field>
600 <field>
601 <name>postal_greeting_display</name>
602 <title>Postal Greeting</title>
603 <type>varchar</type>
604 <length>255</length>
605 <comment>Cache Postal greeting.</comment>
606 <readonly>true</readonly>
607 <add>3.0</add>
608 </field>
609 <field>
610 <name>addressee_id</name>
611 <type>int unsigned</type>
612 <title>Addressee ID</title>
613 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
614 <add>3.0</add>
615 <export>true</export>
616 <html>
617 <type>Select</type>
618 </html>
619 <pseudoconstant>
620 <optionGroupName>addressee</optionGroupName>
621 </pseudoconstant>
622 </field>
623 <field>
624 <name>addressee_custom</name>
625 <type>varchar</type>
626 <length>128</length>
627 <import>true</import>
628 <export>false</export>
629 <comment>Custom Addressee.</comment>
630 <add>3.0</add>
631 <html>
632 <type>Text</type>
633 <label>Addressee Custom</label>
634 </html>
635 </field>
636 <field>
637 <name>addressee_display</name>
638 <title>Addressee</title>
639 <type>varchar</type>
640 <length>255</length>
641 <comment>Cache Addressee.</comment>
642 <readonly>true</readonly>
643 <add>3.0</add>
644 </field>
645 <field>
646 <name>job_title</name>
647 <type>varchar</type>
648 <length>255</length>
649 <html>
650 <type>Text</type>
651 <size>30</size>
652 <label>Job Title</label>
653 </html>
654 <import>true</import>
655 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
656 <dataPattern>//</dataPattern>
657 <comment>Job Title</comment>
658 <add>1.1</add>
659 <contactType>Individual</contactType>
660 </field>
661 <field>
662 <name>gender_id</name>
663 <title>Gender ID</title>
664 <type>int unsigned</type>
665 <pseudoconstant>
666 <optionGroupName>gender</optionGroupName>
667 </pseudoconstant>
668 <html>
669 <type>Select</type>
670 <label>Gender</label>
671 </html>
672 <headerPattern>/^gender$/i</headerPattern>
673 <comment>FK to gender ID</comment>
674 <import>true</import>
675 <add>1.2</add>
676 <contactType>Individual</contactType>
677 </field>
678 <index>
679 <name>UI_gender</name>
680 <fieldName>gender_id</fieldName>
681 <add>1.6</add>
682 </index>
683 <field>
684 <name>birth_date</name>
685 <type>date</type>
686 <import>true</import>
687 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
688 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
689 <comment>Date of birth</comment>
690 <add>1.1</add>
691 <html>
692 <type>Select Date</type>
693 <formatType>birth</formatType>
694 <label>Birth Date</label>
695 </html>
696 <contactType>Individual</contactType>
697 </field>
698 <field>
699 <name>is_deceased</name>
700 <title>Deceased</title>
701 <import>true</import>
702 <export>true</export>
703 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
704 <type>boolean</type>
705 <default>0</default>
706 <add>1.1</add>
707 <required>true</required>
708 <html>
709 <type>CheckBox</type>
710 <label>Is Deceased</label>
711 </html>
712 <contactType>Individual</contactType>
713 </field>
714 <index>
715 <name>index_is_deceased</name>
716 <fieldName>is_deceased</fieldName>
717 <add>4.7</add>
718 </index>
719 <field>
720 <name>deceased_date</name>
721 <type>date</type>
722 <import>true</import>
723 <export>true</export>
724 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
725 <comment>Date of deceased</comment>
726 <add>1.5</add>
727 <html>
728 <type>Select Date</type>
729 <formatType>birth</formatType>
730 <label>Deceased Date</label>
731 </html>
732 <contactType>Individual</contactType>
733 </field>
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 <label>Household Name</label>
742 </html>
743 <import>true</import>
744 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
745 <dataPattern>/^\w+$/</dataPattern>
746 <comment>Household Name.</comment>
747 <fulltext/>
748 <add>1.1</add>
749 <contactType>Household</contactType>
750 </field>
751 <index>
752 <name>index_household_name</name>
753 <fieldName>household_name</fieldName>
754 <add>1.8</add>
755 </index>
756 <field>
757 <name>primary_contact_id</name>
758 <type>int unsigned</type>
759 <title>Household Primary Contact ID</title>
760 <comment>Optional FK to Primary Contact for this household.</comment>
761 <html>
762 <label>Household Primary Contact</label>
763 </html>
764 <add>1.1</add>
765 <contactType>Household</contactType>
766 <readonly>true</readonly>
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 <label>Organization Name</label>
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 <contactType>Organization</contactType>
791 </field>
792 <index>
793 <name>index_organization_name</name>
794 <fieldName>organization_name</fieldName>
795 <add>1.8</add>
796 </index>
797 <field>
798 <name>sic_code</name>
799 <type>varchar</type>
800 <length>8</length>
801 <import>true</import>
802 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
803 <comment>Standard Industry Classification Code.</comment>
804 <add>1.1</add>
805 <html>
806 <type>Text</type>
807 <label>SIC Code</label>
808 </html>
809 <contactType>Organization</contactType>
810 </field>
811 <field>
812 <name>user_unique_id</name>
813 <rule>url</rule>
814 <title>Unique ID (OpenID)</title>
815 <type>varchar</type>
816 <length>255</length>
817 <import>true</import>
818 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
819 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
820 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
821 <add>2.0</add>
822 <html>
823 <type>Text</type>
824 </html>
825 </field>
826 <field>
827 <name>employer_id</name>
828 <title>Current Employer ID</title>
829 <uniqueName>current_employer_id</uniqueName>
830 <type>int unsigned</type>
831 <comment>OPTIONAL FK to civicrm_contact record.</comment>
832 <export>true</export>
833 <add>2.1</add>
834 <html>
835 <type>EntityRef</type>
836 <label>Current Employer</label>
837 </html>
838 <contactType>Individual</contactType>
839 </field>
840 <foreignKey>
841 <name>employer_id</name>
842 <table>civicrm_contact</table>
843 <key>id</key>
844 <add>2.1</add>
845 <onDelete>SET NULL</onDelete>
846 </foreignKey>
847 <field>
848 <name>is_deleted</name>
849 <title>Contact is in Trash</title>
850 <uniqueName>contact_is_deleted</uniqueName>
851 <type>boolean</type>
852 <default>0</default>
853 <required>true</required>
854 <export>true</export>
855 <add>3.2</add>
856 <html>
857 <type>CheckBox</type>
858 </html>
859 </field>
860 <index>
861 <name>index_is_deleted_sort_name</name>
862 <fieldName>is_deleted</fieldName>
863 <fieldName>sort_name</fieldName>
864 <fieldName>id</fieldName>
865 <add>4.4</add>
866 </index>
867 <field>
868 <name>created_date</name>
869 <type>timestamp</type>
870 <comment>When was the contact was created.</comment>
871 <required>false</required>
872 <export>true</export>
873 <default>NULL</default>
874 <html>
875 <label>Created Date</label>
876 </html>
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 <html>
892 <label>Modified Date</label>
893 </html>
894 <readonly>true</readonly>
895 <add>4.3</add>
896 </field>
897 <index>
898 <name>index_modified_date</name>
899 <fieldName>modified_date</fieldName>
900 <add>5.18</add>
901 </index>
902 </table>