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