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 TO |
76 | </index> |
77 | <field> | |
8f069c03 EM |
78 | <name>gender</name> |
79 | <type>enum</type> | |
80 | <import>true</import> | |
8834b2dd | 81 | <values>Female, Male, Other</values> |
8f069c03 EM |
82 | <add>1.1</add> |
83 | <drop>1.2</drop> | |
6a488035 TO |
84 | </field> |
85 | <field> | |
8f069c03 EM |
86 | <name>prefix_id</name> |
87 | <type>int unsigned</type> | |
88 | <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment> | |
89 | <headerPattern>/^(prefix|title)/i</headerPattern> | |
90 | <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern> | |
91 | <add>1.2</add> | |
6a488035 TO |
92 | </field> |
93 | <index> | |
8f069c03 EM |
94 | <name>UI_prefix</name> |
95 | <fieldName>prefix_id</fieldName> | |
96 | <add>1.6</add> | |
6a488035 TO |
97 | </index> |
98 | <field> | |
8f069c03 EM |
99 | <name>suffix_id</name> |
100 | <type>int unsigned</type> | |
101 | <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment> | |
102 | <headerPattern>/^suffix$/i</headerPattern> | |
103 | <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern> | |
104 | <add>1.2</add> | |
6a488035 TO |
105 | </field> |
106 | <index> | |
8f069c03 EM |
107 | <name>UI_suffix</name> |
108 | <fieldName>suffix_id</fieldName> | |
109 | <add>1.6</add> | |
6a488035 TO |
110 | </index> |
111 | <field> | |
8f069c03 EM |
112 | <name>prefix</name> |
113 | <type>varchar</type> | |
114 | <length>64</length> | |
115 | <import>true</import> | |
116 | <comment>Prefix to Name.</comment> | |
117 | <add>1.1</add> | |
118 | <drop>1.2</drop> | |
6a488035 TO |
119 | </field> |
120 | <field> | |
8f069c03 EM |
121 | <name>suffix</name> |
122 | <type>varchar</type> | |
123 | <length>64</length> | |
124 | <import>true</import> | |
125 | <comment>Suffix to Name.</comment> | |
126 | <add>1.1</add> | |
127 | <drop>1.2</drop> | |
6a488035 TO |
128 | </field> |
129 | <field> | |
8f069c03 EM |
130 | <name>greeting_type</name> |
131 | <type>varchar</type> | |
132 | <length>128</length> | |
133 | <comment>Preferred greeting format.</comment> | |
134 | <add>1.1</add> | |
135 | <drop>2.2</drop> | |
6a488035 TO |
136 | </field> |
137 | <field> | |
8f069c03 EM |
138 | <name>greeting_type_id</name> |
139 | <title>Greeting Type</title> | |
140 | <type>int unsigned</type> | |
141 | <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment> | |
142 | <add>2.2</add> | |
6a488035 TO |
143 | </field> |
144 | <field> | |
8f069c03 EM |
145 | <name>custom_greeting</name> |
146 | <type>varchar</type> | |
147 | <length>128</length> | |
148 | <comment>Custom greeting message.</comment> | |
149 | <add>1.1</add> | |
6a488035 TO |
150 | </field> |
151 | <field> | |
8f069c03 EM |
152 | <name>job_title</name> |
153 | <type>varchar</type> | |
154 | <length>64</length> | |
155 | <import>true</import> | |
156 | <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern> | |
157 | <dataPattern>//</dataPattern> | |
158 | <comment>Job Title</comment> | |
159 | <add>1.1</add> | |
6a488035 TO |
160 | </field> |
161 | <field> | |
8f069c03 EM |
162 | <name>gender_id</name> |
163 | <type>int unsigned</type> | |
164 | <headerPattern>/^gender$/i</headerPattern> | |
165 | <comment>FK to gender ID</comment> | |
166 | <add>1.2</add> | |
6a488035 TO |
167 | </field> |
168 | <index> | |
8f069c03 EM |
169 | <name>UI_gender</name> |
170 | <fieldName>gender_id</fieldName> | |
171 | <add>1.6</add> | |
6a488035 TO |
172 | </index> |
173 | <field> | |
8f069c03 EM |
174 | <name>birth_date</name> |
175 | <type>date</type> | |
176 | <import>true</import> | |
177 | <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern> | |
178 | <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern> | |
179 | <comment>Date of birth</comment> | |
180 | <add>1.1</add> | |
181 | </field> | |
182 | <field> | |
183 | <name>is_deceased</name> | |
945ddec3 | 184 | <title>Deceased</title> |
8f069c03 EM |
185 | <import>true</import> |
186 | <export>true</export> | |
187 | <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern> | |
188 | <type>boolean</type> | |
189 | <default>0</default> | |
190 | <add>1.1</add> | |
191 | </field> | |
192 | <field> | |
193 | <name>deceased_date</name> | |
194 | <type>date</type> | |
195 | <import>true</import> | |
196 | <export>true</export> | |
197 | <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern> | |
198 | <comment>Date of deceased</comment> | |
199 | <add>1.5</add> | |
200 | </field> | |
201 | <field> | |
202 | <name>phone_to_household_id</name> | |
203 | <type>int unsigned</type> | |
204 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household | |
205 | rather than individual location. | |
206 | </comment> | |
207 | <add>1.1</add> | |
208 | </field> | |
209 | <field> | |
210 | <name>email_to_household_id</name> | |
211 | <type>int unsigned</type> | |
212 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household | |
213 | rather than individual location. | |
214 | </comment> | |
215 | <add>1.1</add> | |
216 | </field> | |
217 | <field> | |
218 | <name>mail_to_household_id</name> | |
219 | <type>int unsigned</type> | |
220 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household | |
221 | rather than individual location. | |
222 | </comment> | |
223 | <add>1.1</add> | |
6a488035 TO |
224 | </field> |
225 | <index> | |
226 | <name>UI_contact</name> | |
227 | <fieldName>contact_id</fieldName> | |
228 | <unique>true</unique> | |
229 | <add>1.6</add> | |
230 | </index> | |
231 | </table> |