Merge pull request #19525 from eileenmcnaughton/member_soft
[civicrm-core.git] / xml / schema / Contact / Household.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>Household</class>
6 <name>civicrm_household</name>
7 <comment>Define household specific properties</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Unique Household ID</comment>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.1</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>contact_id</name>
26 <title>Contact ID</title>
27 <type>int unsigned</type>
28 <required>true</required>
29 <comment>FK to Contact ID</comment>
30 <html>
31 <label>Contact</label>
32 </html>
33 <add>1.1</add>
34 </field>
35 <foreignKey>
36 <name>contact_id</name>
37 <table>civicrm_contact</table>
38 <key>id</key>
39 <add>1.1</add>
40 </foreignKey>
41 <field>
42 <name>household_name</name>
43 <type>varchar</type>
44 <length>128</length>
45 <import>true</import>
46 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
47 <dataPattern>/^\w+$/</dataPattern>
48 <comment>Household Name.</comment>
49 <fulltext/>
50 <add>1.1</add>
51 </field>
52 <index>
53 <name>index_household_name</name>
54 <fieldName>household_name</fieldName>
55 <add>1.8</add>
56 </index>
57 <field>
58 <name>primary_contact_id</name>
59 <title>Primary Contact ID</title>
60 <type>int unsigned</type>
61 <comment>Optional FK to Primary Contact for this household.</comment>
62 <html>
63 <label>Primary Contact</label>
64 </html>
65 <add>1.1</add>
66 </field>
67 <foreignKey>
68 <name>primary_contact_id</name>
69 <table>civicrm_contact</table>
70 <key>id</key>
71 <add>1.1</add>
72 </foreignKey>
73 <index>
74 <name>UI_contact</name>
75 <fieldName>contact_id</fieldName>
76 <unique>true</unique>
77 <add>1.6</add>
78 </index>
79 </table>