Merge remote-tracking branch 'upstream/4.4' into 4.4-4.5-2014-09-08-20-42-29
[civicrm-core.git] / xml / schema / Core / OpenID.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Core</base>
4 <class>OpenID</class>
5 <name>civicrm_openid</name>
6 <comment>OpenID information for a specific location.</comment>
7 <add>2.0</add>
8 <field>
9 <name>id</name>
10 <type>int unsigned</type>
11 <required>true</required>
12 <comment>Unique OpenID ID</comment>
13 <add>2.0</add>
14 </field>
15 <primaryKey>
16 <name>id</name>
17 <autoincrement>true</autoincrement>
18 </primaryKey>
19 <field>
20 <name>contact_id</name>
21 <type>int unsigned</type>
22 <comment>FK to Contact ID</comment>
23 <add>2.0</add>
24 </field>
25 <foreignKey>
26 <name>contact_id</name>
27 <table>civicrm_contact</table>
28 <key>id</key>
29 <add>2.0</add>
30 <onDelete>CASCADE</onDelete>
31 </foreignKey>
32 <field>
33 <name>location_type_id</name>
34 <title>OpenID Location Type</title>
35 <type>int unsigned</type>
36 <comment>Which Location does this email belong to.</comment>
37 <add>2.0</add>
38 </field>
39 <index>
40 <name>index_location_type</name>
41 <fieldName>location_type_id</fieldName>
42 <add>2.0</add>
43 </index>
44 <field>
45 <name>openid</name>
46 <title>OpenID</title>
47 <type>varchar</type>
48 <length>255</length>
49 <import>true</import>
50 <headerPattern>/^Open.?ID|u(niq\w*)?.?ID/i</headerPattern>
51 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
52 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
53 <rule>url</rule>
54 <comment>OpenID</comment>
55 <add>2.0</add>
56 </field>
57 <index>
58 <name>UI_openid</name>
59 <fieldName>openid</fieldName>
60 <unique>true</unique>
61 <add>2.0</add>
62 </index>
63 <field>
64 <name>allowed_to_login</name>
65 <type>boolean</type>
66 <required>true</required>
67 <default>0</default>
68 <comment>Whether or not this user is allowed to login</comment>
69 <add>2.0</add>
70 </field>
71 <field>
72 <name>is_primary</name>
73 <title>Is OpenID Primary?</title>
74 <type>boolean</type>
75 <default>0</default>
76 <comment>Is this the primary email for this contact and location.</comment>
77 <add>2.0</add>
78 </field>
79 </table>