Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contact</base> | |
5 | <class>Individual</class> | |
6 | <name>civicrm_individual</name> | |
7 | <comment>Define contact-individual specific properties. Extends civicrm_contact.</comment> | |
8 | <log>true</log> | |
9 | <add>1.1</add> | |
10 | <field> | |
8f069c03 EM |
11 | <name>id</name> |
12 | <type>int unsigned</type> | |
13 | <required>true</required> | |
14 | <comment>Unique Individual ID</comment> | |
15 | <add>1.1</add> | |
6a488035 TO |
16 | </field> |
17 | <primaryKey> | |
8f069c03 EM |
18 | <name>id</name> |
19 | <autoincrement>true</autoincrement> | |
6a488035 TO |
20 | </primaryKey> |
21 | <field> | |
8f069c03 EM |
22 | <name>contact_id</name> |
23 | <type>int unsigned</type> | |
24 | <required>true</required> | |
25 | <comment>FK to Contact ID</comment> | |
26 | <add>1.1</add> | |
6a488035 TO |
27 | </field> |
28 | <foreignKey> | |
8f069c03 EM |
29 | <name>contact_id</name> |
30 | <table>civicrm_contact</table> | |
31 | <key>id</key> | |
32 | <add>1.1</add> | |
6a488035 TO |
33 | </foreignKey> |
34 | <field> | |
8f069c03 EM |
35 | <name>first_name</name> |
36 | <type>varchar</type> | |
37 | <length>64</length> | |
38 | <import>true</import> | |
39 | <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern> | |
40 | <dataPattern>/^\w+$/</dataPattern> | |
41 | <fulltext/> | |
42 | <comment>First Name.</comment> | |
43 | <add>1.1</add> | |
6a488035 TO |
44 | </field> |
45 | <index> | |
8f069c03 EM |
46 | <name>index_first_name</name> |
47 | <fieldName>first_name</fieldName> | |
48 | <add>1.8</add> | |
6a488035 TO |
49 | </index> |
50 | <field> | |
8f069c03 EM |
51 | <name>middle_name</name> |
52 | <type>varchar</type> | |
53 | <length>64</length> | |
54 | <import>true</import> | |
55 | <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern> | |
56 | <dataPattern>/^\w+$/</dataPattern> | |
57 | <fulltext/> | |
58 | <comment>Middle Name.</comment> | |
59 | <add>1.1</add> | |
60 | </field> | |
61 | <field> | |
62 | <name>last_name</name> | |
63 | <type>varchar</type> | |
64 | <length>64</length> | |
65 | <import>true</import> | |
66 | <headerPattern>/^(l(ast\s)?name)$/i</headerPattern> | |
67 | <dataPattern>/^\w+(\s\w+)?+$/</dataPattern> | |
68 | <comment>Last Name.</comment> | |
69 | <fulltext/> | |
70 | <add>1.1</add> | |
6a488035 TO |
71 | </field> |
72 | <index> | |
8f069c03 EM |
73 | <name>index_last_name</name> |
74 | <fieldName>last_name</fieldName> | |
75 | <add>1.8</add> | |
6a488035 | 76 | </index> |
6a488035 | 77 | <field> |
8f069c03 EM |
78 | <name>prefix_id</name> |
79 | <type>int unsigned</type> | |
80 | <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment> | |
81 | <headerPattern>/^(prefix|title)/i</headerPattern> | |
82 | <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern> | |
83 | <add>1.2</add> | |
6a488035 TO |
84 | </field> |
85 | <index> | |
8f069c03 EM |
86 | <name>UI_prefix</name> |
87 | <fieldName>prefix_id</fieldName> | |
88 | <add>1.6</add> | |
6a488035 TO |
89 | </index> |
90 | <field> | |
8f069c03 EM |
91 | <name>suffix_id</name> |
92 | <type>int unsigned</type> | |
93 | <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment> | |
94 | <headerPattern>/^suffix$/i</headerPattern> | |
95 | <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern> | |
96 | <add>1.2</add> | |
6a488035 TO |
97 | </field> |
98 | <index> | |
8f069c03 EM |
99 | <name>UI_suffix</name> |
100 | <fieldName>suffix_id</fieldName> | |
101 | <add>1.6</add> | |
6a488035 | 102 | </index> |
6a488035 | 103 | <field> |
8f069c03 EM |
104 | <name>greeting_type_id</name> |
105 | <title>Greeting Type</title> | |
106 | <type>int unsigned</type> | |
107 | <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment> | |
108 | <add>2.2</add> | |
6a488035 TO |
109 | </field> |
110 | <field> | |
8f069c03 EM |
111 | <name>custom_greeting</name> |
112 | <type>varchar</type> | |
113 | <length>128</length> | |
114 | <comment>Custom greeting message.</comment> | |
115 | <add>1.1</add> | |
6a488035 TO |
116 | </field> |
117 | <field> | |
8f069c03 EM |
118 | <name>job_title</name> |
119 | <type>varchar</type> | |
120 | <length>64</length> | |
121 | <import>true</import> | |
122 | <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern> | |
123 | <dataPattern>//</dataPattern> | |
124 | <comment>Job Title</comment> | |
125 | <add>1.1</add> | |
6a488035 TO |
126 | </field> |
127 | <field> | |
8f069c03 EM |
128 | <name>gender_id</name> |
129 | <type>int unsigned</type> | |
130 | <headerPattern>/^gender$/i</headerPattern> | |
131 | <comment>FK to gender ID</comment> | |
132 | <add>1.2</add> | |
6a488035 TO |
133 | </field> |
134 | <index> | |
8f069c03 EM |
135 | <name>UI_gender</name> |
136 | <fieldName>gender_id</fieldName> | |
137 | <add>1.6</add> | |
6a488035 TO |
138 | </index> |
139 | <field> | |
8f069c03 EM |
140 | <name>birth_date</name> |
141 | <type>date</type> | |
142 | <import>true</import> | |
143 | <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern> | |
144 | <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern> | |
145 | <comment>Date of birth</comment> | |
146 | <add>1.1</add> | |
147 | </field> | |
148 | <field> | |
149 | <name>is_deceased</name> | |
945ddec3 | 150 | <title>Deceased</title> |
8f069c03 EM |
151 | <import>true</import> |
152 | <export>true</export> | |
153 | <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern> | |
154 | <type>boolean</type> | |
155 | <default>0</default> | |
156 | <add>1.1</add> | |
157 | </field> | |
158 | <field> | |
159 | <name>deceased_date</name> | |
160 | <type>date</type> | |
161 | <import>true</import> | |
162 | <export>true</export> | |
163 | <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern> | |
164 | <comment>Date of deceased</comment> | |
165 | <add>1.5</add> | |
166 | </field> | |
167 | <field> | |
168 | <name>phone_to_household_id</name> | |
169 | <type>int unsigned</type> | |
170 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household | |
171 | rather than individual location. | |
172 | </comment> | |
173 | <add>1.1</add> | |
174 | </field> | |
175 | <field> | |
176 | <name>email_to_household_id</name> | |
177 | <type>int unsigned</type> | |
178 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household | |
179 | rather than individual location. | |
180 | </comment> | |
181 | <add>1.1</add> | |
182 | </field> | |
183 | <field> | |
184 | <name>mail_to_household_id</name> | |
185 | <type>int unsigned</type> | |
186 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household | |
187 | rather than individual location. | |
188 | </comment> | |
189 | <add>1.1</add> | |
6a488035 TO |
190 | </field> |
191 | <index> | |
192 | <name>UI_contact</name> | |
193 | <fieldName>contact_id</fieldName> | |
194 | <unique>true</unique> | |
195 | <add>1.6</add> | |
196 | </index> | |
197 | </table> |