CRM-15168 more metadata titles (& whitespace
[civicrm-core.git] / xml / schema / Core / Phone.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Phone</class>
6 <name>civicrm_phone</name>
7 <comment>Phone information for a specific location.</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <title>Phone ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Unique Phone ID</comment>
16 <add>1.1</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>contact_id</name>
24 <title>Phone Contact</title>
25 <type>int unsigned</type>
26 <comment>FK to Contact ID</comment>
27 <add>2.0</add>
28 </field>
29 <foreignKey>
30 <name>contact_id</name>
31 <table>civicrm_contact</table>
32 <key>id</key>
33 <add>2.0</add>
34 <onDelete>CASCADE</onDelete>
35 </foreignKey>
36 <field>
37 <name>location_type_id</name>
38 <title>Phone Location Type</title>
39 <type>int unsigned</type>
40 <comment>Which Location does this phone belong to.</comment>
41 <pseudoconstant>
42 <table>civicrm_location_type</table>
43 <keyColumn>id</keyColumn>
44 <labelColumn>display_name</labelColumn>
45 </pseudoconstant>
46 <html>
47 <type>Select</type>
48 </html>
49 <add>2.0</add>
50 </field>
51 <index>
52 <name>index_location_type</name>
53 <fieldName>location_type_id</fieldName>
54 <add>2.0</add>
55 </index>
56 <field>
57 <name>is_primary</name>
58 <title>Is Phone Primary?</title>
59 <type>boolean</type>
60 <default>0</default>
61 <comment>Is this the primary phone for this contact and location.</comment>
62 <add>1.1</add>
63 </field>
64 <index>
65 <name>index_is_primary</name>
66 <fieldName>is_primary</fieldName>
67 <add>2.0</add>
68 </index>
69 <field>
70 <name>is_billing</name>
71 <title>Is Billing Phone</title>
72 <type>boolean</type>
73 <default>0</default>
74 <comment>Is this the billing?</comment>
75 <add>2.0</add>
76 </field>
77 <index>
78 <name>index_is_billing</name>
79 <fieldName>is_billing</fieldName>
80 <add>2.0</add>
81 </index>
82 <field>
83 <name>mobile_provider_id</name>
84 <title>Mobile Provider</title>
85 <type>int unsigned</type>
86 <comment>Which Mobile Provider does this phone belong to.</comment>
87 <add>1.1</add>
88 </field>
89 <index>
90 <name>UI_mobile_provider_id</name>
91 <fieldName>mobile_provider_id</fieldName>
92 <add>1.6</add>
93 </index>
94 <field>
95 <name>phone</name>
96 <type>varchar</type>
97 <length>32</length>
98 <import>true</import>
99 <headerPattern>/phone/i</headerPattern>
100 <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern>
101 <comment>Complete phone number.</comment>
102 <add>1.1</add>
103 </field>
104 <field>
105 <name>phone_ext</name>
106 <title>Phone Extension</title>
107 <type>varchar</type>
108 <length>16</length>
109 <html>
110 <type>Text</type>
111 <size>FOUR</size>
112 </html>
113 <import>true</import>
114 <export>true</export>
115 <headerPattern>/extension/i</headerPattern>
116 <dataPattern>/^\d+$/</dataPattern>
117 <comment>Optional extension for a phone number.</comment>
118 <add>3.3</add>
119 </field>
120 <field>
121 <name>phone_numeric</name>
122 <type>varchar</type>
123 <length>32</length>
124 <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment>
125 <add>4.3</add>
126 </field>
127 <index>
128 <name>index_phone_numeric</name>
129 <fieldName>phone_numeric</fieldName>
130 <add>4.3</add>
131 </index>
132 <field>
133 <name>phone_type</name>
134 <type>enum</type>
135 <values>Phone, Mobile, Fax, Pager</values>
136 <headerPattern>/phone\s+type/i</headerPattern>
137 <dataPattern>/phone|mobile|fax|pager/i</dataPattern>
138 <comment>What type of telecom device is this.</comment>
139 <add>1.1</add>
140 <drop>2.2</drop>
141 </field>
142 <field>
143 <name>phone_type_id</name>
144 <title>Phone Type</title>
145 <type>int unsigned</type>
146 <comment>Which type of phone does this number belongs.</comment>
147 <pseudoconstant>
148 <optionGroupName>phone_type</optionGroupName>
149 </pseudoconstant>
150 <html>
151 <type>Select</type>
152 </html>
153 <add>2.2</add>
154 </field>
155 </table>