Ian province abbreviation patch - issue 724
[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 <title>Instant Messenger ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Unique IM 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>IM 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>IM Location Type</title>
39 <type>int unsigned</type>
40 <comment>Which Location does this email belong to.</comment>
41 <pseudoconstant>
42 <table>civicrm_location_type</table>
43 <keyColumn>id</keyColumn>
44 <labelColumn>display_name</labelColumn>
45 </pseudoconstant>
46 <add>2.0</add>
47 <html>
48 <type>Select</type>
49 </html>
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>name</name>
58 <title>IM Screen Name</title>
59 <type>varchar</type>
60 <length>64</length>
61 <import>true</import>
62 <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
63 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
64 <comment>IM screen name</comment>
65 <add>1.1</add>
66 <html>
67 <type>Text</type>
68 </html>
69 </field>
70 <field>
71 <name>provider_id</name>
72 <title>IM Provider</title>
73 <type>int unsigned</type>
74 <comment>Which IM Provider does this screen name belong to.</comment>
75 <add>1.1</add>
76 <pseudoconstant>
77 <optionGroupName>instant_messenger_service</optionGroupName>
78 </pseudoconstant>
79 <html>
80 <type>Select</type>
81 </html>
82 </field>
83 <index>
84 <name>UI_provider_id</name>
85 <fieldName>provider_id</fieldName>
86 <add>1.6</add>
87 </index>
88 <field>
89 <name>is_primary</name>
90 <title>Is IM Primary?</title>
91 <type>boolean</type>
92 <default>0</default>
93 <comment>Is this the primary IM for this contact and location.</comment>
94 <add>1.1</add>
95 </field>
96 <index>
97 <name>index_is_primary</name>
98 <fieldName>is_primary</fieldName>
99 <add>2.0</add>
100 </index>
101 <field>
102 <name>is_billing</name>
103 <title>Is IM Billing?</title>
104 <type>boolean</type>
105 <default>0</default>
106 <comment>Is this the billing?</comment>
107 <add>2.0</add>
108 </field>
109 <index>
110 <name>index_is_billing</name>
111 <fieldName>is_billing</fieldName>
112 <add>2.0</add>
113 </index>
114 </table>