Import from SVN (r45945, r596)
[civicrm-core.git] / xml / schema / Core / Setting.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Core</base>
5 <class>Setting</class>
6 <name>civicrm_setting</name>
7 <comment>Table to store civicrm settings for civicrm core and components.</comment>
8 <add>4.1</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <add>4.1</add>
14 </field>
15 <primaryKey>
16 <name>id</name>
17 <autoincrement>true</autoincrement>
18 </primaryKey>
19 <field>
20 <name>group_name</name>
21 <type>varchar</type>
22 <length>64</length>
23 <required>true</required>
24 <comment>group name for setting element, useful in caching setting elements</comment>
25 <add>4.1</add>
26 </field>
27 <field>
28 <name>name</name>
29 <type>varchar</type>
30 <length>255</length>
31 <comment>Unique name for setting</comment>
32 <add>4.1</add>
33 </field>
34 <index>
35 <name>index_group_name</name>
36 <fieldName>group_name</fieldName>
37 <fieldName>name</fieldName>
38 <add>4.1</add>
39 </index>
40 <field>
41 <name>value</name>
42 <type>text</type>
43 <comment>data associated with this group / name combo</comment>
44 <add>4.1</add>
45 </field>
46 <field>
47 <name>domain_id</name>
48 <type>int unsigned</type>
49 <required>true</required>
50 <comment>Which Domain is this menu item for</comment>
51 <add>4.1</add>
52 </field>
53 <foreignKey>
54 <name>domain_id</name>
55 <table>civicrm_domain</table>
56 <key>id</key>
57 <onDelete>CASCADE</onDelete>
58 <add>4.1</add>
59 </foreignKey>
60 <field>
61 <name>contact_id</name>
62 <type>int unsigned</type>
63 <comment>FK to Contact ID if the setting is localized to a contact</comment>
64 <add>4.1</add>
65 </field>
66 <foreignKey>
67 <name>contact_id</name>
68 <table>civicrm_contact</table>
69 <key>id</key>
70 <onDelete>CASCADE</onDelete>
71 <add>4.1</add>
72 </foreignKey>
73 <field>
74 <name>is_domain</name>
75 <type>boolean</type>
76 <comment>Is this setting a contact specific or site wide setting?</comment>
77 <add>4.1</add>
78 </field>
79 <field>
80 <name>component_id</name>
81 <type>int unsigned</type>
82 <comment>Component that this menu item belongs to</comment>
83 <add>4.1</add>
84 </field>
85 <foreignKey>
86 <name>component_id</name>
87 <table>civicrm_component</table>
88 <key>id</key>
89 <add>4.1</add>
90 </foreignKey>
91 <field>
92 <name>created_date</name>
93 <type>datetime</type>
94 <comment>When was the setting created</comment>
95 <add>4.1</add>
96 </field>
97 <field>
98 <name>created_id</name>
99 <type>int unsigned</type>
100 <comment>FK to civicrm_contact, who created this setting</comment>
101 <add>4.1</add>
102 </field>
103 <foreignKey>
104 <name>created_id</name>
105 <table>civicrm_contact</table>
106 <key>id</key>
107 <add>4.1</add>
108 <onDelete>SET NULL</onDelete>
109 </foreignKey>
110</table>