Merge pull request #1765 from lynndanzig/master
[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 <required>true</required>
13 <comment>Unique Website ID</comment>
14 <add>3.2</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>contact_id</name>
22 <type>int unsigned</type>
23 <comment>FK to Contact ID</comment>
24 <add>3.2</add>
25 </field>
26 <foreignKey>
27 <name>contact_id</name>
28 <table>civicrm_contact</table>
29 <key>id</key>
30 <add>3.2</add>
31 <onDelete>CASCADE</onDelete>
32 </foreignKey>
33 <field>
34 <name>url</name>
35 <title>Website</title>
36 <type>varchar</type>
37 <length>128</length>
38 <html>
39 <type>Text</type>
40 <size>BIG</size>
41 </html>
42 <import>true</import>
43 <headerPattern>/Website/i</headerPattern>
44 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
45 <comment>Website</comment>
46 <add>3.2</add>
47 </field>
48 <field>
49 <name>website_type_id</name>
50 <title>Website Type</title>
51 <type>int unsigned</type>
52 <comment>Which Website type does this website belong to.</comment>
53 <add>3.2</add>
54 <pseudoconstant>
55 <optionGroupName>website_type</optionGroupName>
56 </pseudoconstant>
57 <html>
58 <type>Select</type>
59 </html>
60 </field>
61 <index>
62 <name>UI_website_type_id</name>
63 <fieldName>website_type_id</fieldName>
64 <add>3.2</add>
65 </index>
66 </table>