CRM-15168 stdise whitespace across schema xml to make editing easier
[civicrm-core.git] / xml / schema / Core / IM.xml
CommitLineData
6a488035
TO
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>
8f069c03
EM
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Unique IM ID</comment>
15 <add>1.1</add>
6a488035
TO
16 </field>
17 <primaryKey>
8f069c03
EM
18 <name>id</name>
19 <autoincrement>true</autoincrement>
6a488035
TO
20 </primaryKey>
21 <field>
8f069c03
EM
22 <name>contact_id</name>
23 <type>int unsigned</type>
24 <comment>FK to Contact ID</comment>
25 <add>2.0</add>
6a488035
TO
26 </field>
27 <foreignKey>
8f069c03
EM
28 <name>contact_id</name>
29 <table>civicrm_contact</table>
30 <key>id</key>
31 <add>2.0</add>
32 <onDelete>CASCADE</onDelete>
6a488035
TO
33 </foreignKey>
34 <field>
8f069c03
EM
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 <pseudoconstant>
40 <table>civicrm_location_type</table>
41 <keyColumn>id</keyColumn>
42 <labelColumn>display_name</labelColumn>
43 </pseudoconstant>
44 <add>2.0</add>
6a488035
TO
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>
8f069c03
EM
52 <name>name</name>
53 <title>IM Screen Name</title>
54 <type>varchar</type>
55 <length>64</length>
56 <import>true</import>
57 <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
58 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
59 <comment>IM screen name</comment>
60 <add>1.1</add>
6a488035
TO
61 </field>
62 <field>
8f069c03
EM
63 <name>provider_id</name>
64 <title>IM Provider</title>
65 <type>int unsigned</type>
66 <comment>Which IM Provider does this screen name belong to.</comment>
67 <add>1.1</add>
68 <pseudoconstant>
69 <optionGroupName>instant_messenger_service</optionGroupName>
70 </pseudoconstant>
71 <html>
72 <type>Select</type>
73 </html>
6a488035
TO
74 </field>
75 <index>
76 <name>UI_provider_id</name>
3c7d2158 77 <fieldName>provider_id</fieldName>
6a488035
TO
78 <add>1.6</add>
79 </index>
80 <field>
8f069c03
EM
81 <name>is_primary</name>
82 <title>Is IM Primary?</title>
83 <type>boolean</type>
84 <default>0</default>
85 <comment>Is this the primary IM for this contact and location.</comment>
86 <add>1.1</add>
6a488035
TO
87 </field>
88 <index>
89 <name>index_is_primary</name>
90 <fieldName>is_primary</fieldName>
91 <add>2.0</add>
92 </index>
93 <field>
8f069c03
EM
94 <name>is_billing</name>
95 <type>boolean</type>
96 <default>0</default>
97 <comment>Is this the billing?</comment>
98 <add>2.0</add>
6a488035
TO
99 </field>
100 <index>
101 <name>index_is_billing</name>
102 <fieldName>is_billing</fieldName>
103 <add>2.0</add>
104 </index>
105</table>