CRM-13497 - Move rows and cols
[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>
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>
e7e657f0
AS
63 <pseudoconstant>
64 <optionGroupName>instant_messenger_service</optionGroupName>
65 </pseudoconstant>
6a488035
TO
66 </field>
67 <index>
68 <name>UI_provider_id</name>
3c7d2158 69 <fieldName>provider_id</fieldName>
6a488035
TO
70 <add>1.6</add>
71 </index>
72 <field>
73 <name>is_primary</name>
74 <title>Is IM Primary?</title>
75 <type>boolean</type>
76 <default>0</default>
77 <comment>Is this the primary IM for this contact and location.</comment>
78 <add>1.1</add>
79 </field>
80 <index>
81 <name>index_is_primary</name>
82 <fieldName>is_primary</fieldName>
83 <add>2.0</add>
84 </index>
85 <field>
86 <name>is_billing</name>
87 <type>boolean</type>
88 <default>0</default>
89 <comment>Is this the billing?</comment>
90 <add>2.0</add>
91 </field>
92 <index>
93 <name>index_is_billing</name>
94 <fieldName>is_billing</fieldName>
95 <add>2.0</add>
96 </index>
97</table>