remove trailing whitespaces en-masse
[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 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Unique Phone 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 <comment>FK to Contact ID</comment>
25 <add>2.0</add>
26 </field>
27 <foreignKey>
28 <name>contact_id</name>
29 <table>civicrm_contact</table>
30 <key>id</key>
31 <add>2.0</add>
32 <onDelete>CASCADE</onDelete>
33 </foreignKey>
34 <field>
35 <name>location_type_id</name>
36 <title>Phone Location Type</title>
37 <type>int unsigned</type>
38 <comment>Which Location does this phone belong to.</comment>
39 <pseudoconstant>
40 <table>civicrm_location_type</table>
41 <keyColumn>id</keyColumn>
42 <labelColumn>display_name</labelColumn>
43 </pseudoconstant>
44 <add>2.0</add>
45 </field>
46 <index>
47 <name>index_location_type</name>
48 <fieldName>location_type_id</fieldName>
49 <add>2.0</add>
50 </index>
51 <field>
52 <name>is_primary</name>
53 <title>Is Phone Primary?</title>
54 <type>boolean</type>
55 <default>0</default>
56 <comment>Is this the primary phone for this contact and location.</comment>
57 <add>1.1</add>
58 </field>
59 <index>
60 <name>index_is_primary</name>
61 <fieldName>is_primary</fieldName>
62 <add>2.0</add>
63 </index>
64 <field>
65 <name>is_billing</name>
66 <type>boolean</type>
67 <default>0</default>
68 <comment>Is this the billing?</comment>
69 <add>2.0</add>
70 </field>
71 <index>
72 <name>index_is_billing</name>
73 <fieldName>is_billing</fieldName>
74 <add>2.0</add>
75 </index>
76 <field>
77 <name>mobile_provider_id</name>
78 <type>int unsigned</type>
79 <comment>Which Mobile Provider does this phone belong to.</comment>
80 <add>1.1</add>
81 </field>
82 <index>
83 <name>UI_mobile_provider_id</name>
84 <fieldName>mobile_provider_id</fieldName>
85 <add>1.6</add>
86 </index>
87 <field>
88 <name>phone</name>
89 <type>varchar</type>
90 <length>32</length>
91 <import>true</import>
92 <headerPattern>/phone/i</headerPattern>
93 <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern>
94 <comment>Complete phone number.</comment>
95 <add>1.1</add>
96 </field>
97 <field>
98 <name>phone_ext</name>
99 <title>Phone Extension</title>
100 <type>varchar</type>
101 <length>16</length>
102 <size>FOUR</size>
103 <import>true</import>
104 <export>true</export>
105 <headerPattern>/extension/i</headerPattern>
106 <dataPattern>/^\d+$/</dataPattern>
107 <comment>Optional extension for a phone number.</comment>
108 <add>3.3</add>
109 </field>
110 <field>
111 <name>phone_numeric</name>
112 <type>varchar</type>
113 <length>32</length>
114 <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment>
115 <add>4.3</add>
116 </field>
117 <index>
118 <name>index_phone_numeric</name>
119 <fieldName>phone_numeric</fieldName>
120 <add>4.3</add>
121 </index>
122 <field>
123 <name>phone_type</name>
124 <type>enum</type>
125 <values>Phone, Mobile, Fax, Pager</values>
126 <headerPattern>/phone\s+type/i</headerPattern>
127 <dataPattern>/phone|mobile|fax|pager/i</dataPattern>
128 <comment>What type of telecom device is this.</comment>
129 <add>1.1</add>
130 <drop>2.2</drop>
131 </field>
132 <field>
133 <name>phone_type_id</name>
134 <title>Phone Type</title>
135 <type>int unsigned</type>
136 <comment>Which type of phone does this number belongs.</comment>
137 <pseudoconstant>
138 <optionGroupName>phone_type</optionGroupName>
139 </pseudoconstant>
140 <add>2.2</add>
141 </field>
142 </table>