Merge pull request #23568 from civicrm/5.50
[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 <title>Instant Messaging</title>
11 <titlePlural>Instant Messaging</titlePlural>
12 <icon>fa-comments-o</icon>
13 <labelField>name</labelField>
14 <field>
15 <name>id</name>
16 <title>Instant Messenger ID</title>
17 <type>int unsigned</type>
18 <required>true</required>
19 <comment>Unique IM ID</comment>
20 <html>
21 <type>Number</type>
22 </html>
23 <add>1.1</add>
24 </field>
25 <primaryKey>
26 <name>id</name>
27 <autoincrement>true</autoincrement>
28 </primaryKey>
29 <field>
30 <name>contact_id</name>
31 <title>Contact ID</title>
32 <type>int unsigned</type>
33 <comment>FK to Contact ID</comment>
34 <html>
35 <label>Contact</label>
36 </html>
37 <add>2.0</add>
38 </field>
39 <foreignKey>
40 <name>contact_id</name>
41 <table>civicrm_contact</table>
42 <key>id</key>
43 <add>2.0</add>
44 <onDelete>CASCADE</onDelete>
45 </foreignKey>
46 <field>
47 <name>location_type_id</name>
48 <title>IM Location Type</title>
49 <type>int unsigned</type>
50 <comment>Which Location does this email belong to.</comment>
51 <pseudoconstant>
52 <table>civicrm_location_type</table>
53 <keyColumn>id</keyColumn>
54 <labelColumn>display_name</labelColumn>
55 </pseudoconstant>
56 <add>2.0</add>
57 <html>
58 <type>Select</type>
59 </html>
60 </field>
61 <index>
62 <name>index_location_type</name>
63 <fieldName>location_type_id</fieldName>
64 <add>2.0</add>
65 </index>
66 <field>
67 <name>name</name>
68 <title>IM Screen Name</title>
69 <type>varchar</type>
70 <length>64</length>
71 <import>true</import>
72 <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
73 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
74 <comment>IM screen name</comment>
75 <add>1.1</add>
76 <html>
77 <type>Text</type>
78 </html>
79 </field>
80 <field>
81 <name>provider_id</name>
82 <title>IM Provider</title>
83 <type>int unsigned</type>
84 <comment>Which IM Provider does this screen name belong to.</comment>
85 <add>1.1</add>
86 <pseudoconstant>
87 <optionGroupName>instant_messenger_service</optionGroupName>
88 </pseudoconstant>
89 <html>
90 <type>Select</type>
91 </html>
92 </field>
93 <index>
94 <name>UI_provider_id</name>
95 <fieldName>provider_id</fieldName>
96 <add>1.6</add>
97 </index>
98 <field>
99 <name>is_primary</name>
100 <title>Primary IM</title>
101 <type>boolean</type>
102 <default>0</default>
103 <required>true</required>
104 <html>
105 <type>Radio</type>
106 </html>
107 <comment>Is this the primary IM for this contact and location.</comment>
108 <add>1.1</add>
109 </field>
110 <index>
111 <name>index_is_primary</name>
112 <fieldName>is_primary</fieldName>
113 <add>2.0</add>
114 </index>
115 <field>
116 <name>is_billing</name>
117 <title>Is IM Billing?</title>
118 <type>boolean</type>
119 <default>0</default>
120 <required>true</required>
121 <comment>Is this the billing?</comment>
122 <add>2.0</add>
123 </field>
124 <index>
125 <name>index_is_billing</name>
126 <fieldName>is_billing</fieldName>
127 <add>2.0</add>
128 </index>
129 </table>