Merge pull request #18912 from yashodha/dev_2153
[civicrm-core.git] / xml / schema / Core / OptionValue.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>OptionValue</class>
6 <name>civicrm_option_value</name>
7 <add>1.5</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <title>Option Value ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Option ID</comment>
15 <add>1.5</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>option_group_id</name>
23 <title>Option Group ID</title>
24 <type>int unsigned</type>
25 <required>true</required>
26 <comment>Group which this option belongs to.</comment>
27 <add>1.5</add>
28 <pseudoconstant>
29 <table>civicrm_option_group</table>
30 <keyColumn>id</keyColumn>
31 <nameColumn>name</nameColumn>
32 <labelColumn>title</labelColumn>
33 </pseudoconstant>
34 <html>
35 <type>Select</type>
36 </html>
37 </field>
38 <foreignKey>
39 <name>option_group_id</name>
40 <table>civicrm_option_group</table>
41 <key>id</key>
42 <add>1.5</add>
43 <onDelete>CASCADE</onDelete>
44 </foreignKey>
45 <field>
46 <name>label</name>
47 <title>Option Label</title>
48 <type>varchar</type>
49 <required>true</required>
50 <length>512</length>
51 <localizable>true</localizable>
52 <comment>Option string as displayed to users - e.g. the label in an HTML OPTION tag.</comment>
53 <add>1.5</add>
54 </field>
55 <field>
56 <name>value</name>
57 <title>Option Value</title>
58 <type>varchar</type>
59 <length>512</length>
60 <required>true</required>
61 <comment>The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.</comment>
62 <add>1.5</add>
63 <change>3.3</change>
64 </field>
65 <field>
66 <name>name</name>
67 <title>Option Name</title>
68 <type>varchar</type>
69 <length>255</length>
70 <import>true</import>
71 <comment>Stores a fixed (non-translated) name for this option value. Lookup functions should use the name as the key for the option value row.</comment>
72 <add>1.5</add>
73 </field>
74 <field>
75 <name>grouping</name>
76 <title>Option Grouping Name</title>
77 <type>varchar</type>
78 <length>255</length>
79 <comment>Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.</comment>
80 <add>1.5</add>
81 </field>
82 <field>
83 <name>filter</name>
84 <type>int unsigned</type>
85 <default>0</default>
86 <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment>
87 <add>1.5</add>
88 </field>
89 <field>
90 <name>is_default</name>
91 <title>Option is Default?</title>
92 <type>boolean</type>
93 <default>0</default>
94 <comment>Is this the default option for the group?</comment>
95 <add>1.5</add>
96 </field>
97 <field>
98 <name>weight</name>
99 <title>Order</title>
100 <type>int unsigned</type>
101 <required>true</required>
102 <comment>Controls display sort order.</comment>
103 <add>1.5</add>
104 </field>
105 <field>
106 <name>description</name>
107 <title>Option Description</title>
108 <type>text</type>
109 <html>
110 <type>TextArea</type>
111 <rows>8</rows>
112 <cols>60</cols>
113 </html>
114 <localizable>true</localizable>
115 <comment>Optional description.</comment>
116 <add>1.5</add>
117 </field>
118 <field>
119 <name>is_optgroup</name>
120 <title>Option is Header?</title>
121 <type>boolean</type>
122 <default>0</default>
123 <comment>Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?</comment>
124 <add>1.5</add>
125 </field>
126 <field>
127 <name>is_reserved</name>
128 <title>Option Is Reserved?</title>
129 <type>boolean</type>
130 <default>0</default>
131 <comment>Is this a predefined system object?</comment>
132 <add>1.5</add>
133 </field>
134 <field>
135 <name>is_active</name>
136 <title>Option Is Active</title>
137 <type>boolean</type>
138 <default>1</default>
139 <comment>Is this option active?</comment>
140 <add>1.5</add>
141 </field>
142 <field>
143 <name>component_id</name>
144 <title>Option Component</title>
145 <type>int unsigned</type>
146 <comment>Component that this option value belongs/caters to.</comment>
147 <add>2.0</add>
148 <pseudoconstant>
149 <table>civicrm_component</table>
150 <keyColumn>id</keyColumn>
151 <labelColumn>name</labelColumn>
152 </pseudoconstant>
153 <html>
154 <type>Select</type>
155 </html>
156 </field>
157 <foreignKey>
158 <name>component_id</name>
159 <table>civicrm_component</table>
160 <key>id</key>
161 <add>2.0</add>
162 </foreignKey>
163 <field>
164 <name>domain_id</name>
165 <title>Option Domain</title>
166 <type>int unsigned</type>
167 <pseudoconstant>
168 <table>civicrm_domain</table>
169 <keyColumn>id</keyColumn>
170 <labelColumn>name</labelColumn>
171 </pseudoconstant>
172 <comment>Which Domain is this option value for</comment>
173 <add>3.1</add>
174 </field>
175 <foreignKey>
176 <name>domain_id</name>
177 <table>civicrm_domain</table>
178 <key>id</key>
179 <add>3.1</add>
180 </foreignKey>
181 <field>
182 <name>visibility_id</name>
183 <title>Option Visibility</title>
184 <type>int unsigned</type>
185 <default>NULL</default>
186 <add>2.2</add>
187 <pseudoconstant>
188 <optionGroupName>visibility</optionGroupName>
189 </pseudoconstant>
190 </field>
191 <field>
192 <name>icon</name>
193 <title>Icon</title>
194 <type>varchar</type>
195 <length>255</length>
196 <default>NULL</default>
197 <comment>crm-i icon class</comment>
198 <add>4.7</add>
199 </field>
200 <field>
201 <name>color</name>
202 <title>Color</title>
203 <type>varchar</type>
204 <length>255</length>
205 <comment>Hex color value e.g. #ffffff</comment>
206 <default>NULL</default>
207 <add>4.7</add>
208 </field>
209 <index>
210 <name>index_option_group_id_value</name>
211 <fieldName length="128">value</fieldName>
212 <fieldName>option_group_id</fieldName>
213 <add>1.5</add>
214 </index>
215 <index>
216 <name>index_option_group_id_name</name>
217 <fieldName length="128">name</fieldName>
218 <fieldName>option_group_id</fieldName>
219 <add>2.2</add>
220 </index>
221 </table>