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> | |
11 | <name>id</name> | |
12 | <type>int unsigned</type> | |
13 | <required>true</required> | |
14 | <comment>Unique Individual ID</comment> | |
15 | <add>1.1</add> | |
16 | </field> | |
17 | <primaryKey> | |
18 | <name>id</name> | |
19 | <autoincrement>true</autoincrement> | |
20 | </primaryKey> | |
21 | <field> | |
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> | |
27 | </field> | |
28 | <foreignKey> | |
29 | <name>contact_id</name> | |
30 | <table>civicrm_contact</table> | |
31 | <key>id</key> | |
32 | <add>1.1</add> | |
33 | </foreignKey> | |
34 | <field> | |
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> | |
44 | </field> | |
45 | <index> | |
46 | <name>index_first_name</name> | |
3c7d2158 | 47 | <fieldName>first_name</fieldName> |
6a488035 TO |
48 | <add>1.8</add> |
49 | </index> | |
50 | <field> | |
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> | |
71 | </field> | |
72 | <index> | |
73 | <name>index_last_name</name> | |
3c7d2158 | 74 | <fieldName>last_name</fieldName> |
6a488035 TO |
75 | <add>1.8</add> |
76 | </index> | |
77 | <field> | |
78 | <name>gender</name> | |
79 | <type>enum</type> | |
80 | <import>true</import> | |
81 | <values>Female, Male, Transgender</values> | |
82 | <add>1.1</add> | |
83 | <drop>1.2</drop> | |
84 | </field> | |
85 | <field> | |
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> | |
92 | </field> | |
93 | <index> | |
94 | <name>UI_prefix</name> | |
3c7d2158 | 95 | <fieldName>prefix_id</fieldName> |
6a488035 TO |
96 | <add>1.6</add> |
97 | </index> | |
98 | <field> | |
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> | |
105 | </field> | |
106 | <index> | |
107 | <name>UI_suffix</name> | |
3c7d2158 | 108 | <fieldName>suffix_id</fieldName> |
6a488035 TO |
109 | <add>1.6</add> |
110 | </index> | |
111 | <field> | |
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> | |
119 | </field> | |
120 | <field> | |
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> | |
128 | </field> | |
129 | <field> | |
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> | |
136 | </field> | |
137 | <field> | |
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> | |
143 | </field> | |
144 | <field> | |
145 | <name>custom_greeting</name> | |
146 | <type>varchar</type> | |
147 | <length>128</length> | |
148 | <comment>Custom greeting message.</comment> | |
149 | <add>1.1</add> | |
150 | </field> | |
151 | <field> | |
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> | |
160 | </field> | |
161 | <field> | |
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> | |
167 | </field> | |
168 | <index> | |
169 | <name>UI_gender</name> | |
3c7d2158 | 170 | <fieldName>gender_id</fieldName> |
6a488035 TO |
171 | <add>1.6</add> |
172 | </index> | |
173 | <field> | |
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> | |
184 | <title>Is Deceased</title> | |
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 rather than individual location.</comment> | |
205 | <add>1.1</add> | |
206 | </field> | |
207 | <field> | |
208 | <name>email_to_household_id</name> | |
209 | <type>int unsigned</type> | |
210 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.</comment> | |
211 | <add>1.1</add> | |
212 | </field> | |
213 | <field> | |
214 | <name>mail_to_household_id</name> | |
215 | <type>int unsigned</type> | |
216 | <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.</comment> | |
217 | <add>1.1</add> | |
218 | </field> | |
219 | <index> | |
220 | <name>UI_contact</name> | |
221 | <fieldName>contact_id</fieldName> | |
222 | <unique>true</unique> | |
223 | <add>1.6</add> | |
224 | </index> | |
225 | </table> |