Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2013-12-16-21-42-04
[civicrm-core.git] / xml / schema / Core / IM.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>IM</class>
6 <name>civicrm_im</name>
7 <comment>IM 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 IM 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>IM Location Type</title>
37 <type>int unsigned</type>
38 <comment>Which Location does this email belong to.</comment>
39 <add>2.0</add>
40 </field>
41 <index>
42 <name>index_location_type</name>
43 <fieldName>location_type_id</fieldName>
44 <add>2.0</add>
45 </index>
46 <field>
47 <name>name</name>
48 <title>IM Screen Name</title>
49 <type>varchar</type>
50 <length>64</length>
51 <import>true</import>
52 <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
53 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
54 <comment>IM screen name</comment>
55 <add>1.1</add>
56 </field>
57 <field>
58 <name>provider_id</name>
59 <title>IM Provider</title>
60 <type>int unsigned</type>
61 <comment>Which IM Provider does this screen name belong to.</comment>
62 <add>1.1</add>
63 <pseudoconstant>
64 <optionGroupName>instant_messenger_service</optionGroupName>
65 </pseudoconstant>
66 <html>
67 <type>Select</type>
68 </html>
69 </field>
70 <index>
71 <name>UI_provider_id</name>
72 <fieldName>provider_id</fieldName>
73 <add>1.6</add>
74 </index>
75 <field>
76 <name>is_primary</name>
77 <title>Is IM Primary?</title>
78 <type>boolean</type>
79 <default>0</default>
80 <comment>Is this the primary IM for this contact and location.</comment>
81 <add>1.1</add>
82 </field>
83 <index>
84 <name>index_is_primary</name>
85 <fieldName>is_primary</fieldName>
86 <add>2.0</add>
87 </index>
88 <field>
89 <name>is_billing</name>
90 <type>boolean</type>
91 <default>0</default>
92 <comment>Is this the billing?</comment>
93 <add>2.0</add>
94 </field>
95 <index>
96 <name>index_is_billing</name>
97 <fieldName>is_billing</fieldName>
98 <add>2.0</add>
99 </index>
100 </table>