Merge pull request #2461 from eileenmcnaughton/CRM-14137-2
[civicrm-core.git] / xml / schema / Core / Website.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Website</class>
6 <name>civicrm_website</name>
7 <comment>Website information for a specific location.</comment>
8 <add>3.2</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <title>Website ID</title>
13 <required>true</required>
14 <comment>Unique Website ID</comment>
15 <add>3.2</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>contact_id</name>
23 <title>Contact</title>
24 <type>int unsigned</type>
25 <comment>FK to Contact ID</comment>
26 <add>3.2</add>
27 </field>
28 <foreignKey>
29 <name>contact_id</name>
30 <table>civicrm_contact</table>
31 <key>id</key>
32 <add>3.2</add>
33 <onDelete>CASCADE</onDelete>
34 </foreignKey>
35 <field>
36 <name>url</name>
37 <title>Website</title>
38 <type>varchar</type>
39 <length>128</length>
40 <size>BIG</size>
41 <import>true</import>
42 <headerPattern>/Website/i</headerPattern>
43 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
44 <comment>Website</comment>
45 <add>3.2</add>
46 </field>
47 <field>
48 <name>website_type_id</name>
49 <title>Website Type</title>
50 <type>int unsigned</type>
51 <comment>Which Website type does this website belong to.</comment>
52 <add>3.2</add>
53 <pseudoconstant>
54 <optionGroupName>website_type</optionGroupName>
55 </pseudoconstant>
56 </field>
57 <index>
58 <name>UI_website_type_id</name>
59 <fieldName>website_type_id</fieldName>
60 <add>3.2</add>
61 </index>
62 </table>