Merge pull request #23296 from colemanw/afformRelationships
[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 <paths>
10 <update>civicrm/admin/options/[option_group_id:name]?reset=1&amp;action=update&amp;id=[id]</update>
11 <delete>civicrm/admin/options/[option_group_id:name]?reset=1&amp;action=delete&amp;id=[id]</delete>
12 </paths>
13 <field>
14 <name>id</name>
15 <title>Option Value ID</title>
16 <type>int unsigned</type>
17 <required>true</required>
18 <comment>Option ID</comment>
19 <add>1.5</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>option_group_id</name>
27 <title>Option Group ID</title>
28 <type>int unsigned</type>
29 <required>true</required>
30 <comment>Group which this option belongs to.</comment>
31 <add>1.5</add>
32 <pseudoconstant>
33 <table>civicrm_option_group</table>
34 <keyColumn>id</keyColumn>
35 <nameColumn>name</nameColumn>
36 <labelColumn>title</labelColumn>
37 </pseudoconstant>
38 <html>
39 <type>Select</type>
40 <label>Option Group</label>
41 </html>
42 </field>
43 <foreignKey>
44 <name>option_group_id</name>
45 <table>civicrm_option_group</table>
46 <key>id</key>
47 <add>1.5</add>
48 <onDelete>CASCADE</onDelete>
49 </foreignKey>
50 <field>
51 <name>label</name>
52 <title>Option Label</title>
53 <type>varchar</type>
54 <required>true</required>
55 <length>512</length>
56 <localizable>true</localizable>
57 <comment>Option string as displayed to users - e.g. the label in an HTML OPTION tag.</comment>
58 <add>1.5</add>
59 </field>
60 <field>
61 <name>value</name>
62 <title>Option Value</title>
63 <type>varchar</type>
64 <length>512</length>
65 <required>true</required>
66 <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>
67 <add>1.5</add>
68 <change>3.3</change>
69 </field>
70 <field>
71 <name>name</name>
72 <title>Option Name</title>
73 <type>varchar</type>
74 <length>255</length>
75 <import>true</import>
76 <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>
77 <add>1.5</add>
78 </field>
79 <field>
80 <name>grouping</name>
81 <title>Option Grouping Name</title>
82 <type>varchar</type>
83 <length>255</length>
84 <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>
85 <add>1.5</add>
86 </field>
87 <field>
88 <name>filter</name>
89 <type>int unsigned</type>
90 <default>0</default>
91 <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment>
92 <html>
93 <label>Filter</label>
94 </html>
95 <add>1.5</add>
96 </field>
97 <field>
98 <name>is_default</name>
99 <title>Option is Default?</title>
100 <type>boolean</type>
101 <default>0</default>
102 <comment>Is this the default option for the group?</comment>
103 <add>1.5</add>
104 </field>
105 <field>
106 <name>weight</name>
107 <title>Order</title>
108 <type>int unsigned</type>
109 <required>true</required>
110 <comment>Controls display sort order.</comment>
111 <add>1.5</add>
112 </field>
113 <field>
114 <name>description</name>
115 <title>Option Description</title>
116 <type>text</type>
117 <html>
118 <type>TextArea</type>
119 <rows>8</rows>
120 <cols>60</cols>
121 </html>
122 <localizable>true</localizable>
123 <comment>Optional description.</comment>
124 <add>1.5</add>
125 </field>
126 <field>
127 <name>is_optgroup</name>
128 <title>Option is Header?</title>
129 <type>boolean</type>
130 <default>0</default>
131 <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>
132 <add>1.5</add>
133 </field>
134 <field>
135 <name>is_reserved</name>
136 <title>Option Is Reserved?</title>
137 <type>boolean</type>
138 <default>0</default>
139 <comment>Is this a predefined system object?</comment>
140 <add>1.5</add>
141 </field>
142 <field>
143 <name>is_active</name>
144 <title>Option Is Active</title>
145 <type>boolean</type>
146 <default>1</default>
147 <comment>Is this option active?</comment>
148 <add>1.5</add>
149 </field>
150 <field>
151 <name>component_id</name>
152 <title>Component ID</title>
153 <type>int unsigned</type>
154 <comment>Component that this option value belongs/caters to.</comment>
155 <add>2.0</add>
156 <pseudoconstant>
157 <table>civicrm_component</table>
158 <keyColumn>id</keyColumn>
159 <labelColumn>name</labelColumn>
160 </pseudoconstant>
161 <html>
162 <type>Select</type>
163 <label>Component</label>
164 </html>
165 </field>
166 <foreignKey>
167 <name>component_id</name>
168 <table>civicrm_component</table>
169 <key>id</key>
170 <add>2.0</add>
171 </foreignKey>
172 <field>
173 <name>domain_id</name>
174 <title>Domain ID</title>
175 <type>int unsigned</type>
176 <pseudoconstant>
177 <table>civicrm_domain</table>
178 <keyColumn>id</keyColumn>
179 <labelColumn>name</labelColumn>
180 </pseudoconstant>
181 <comment>Which Domain is this option value for</comment>
182 <html>
183 <label>Domain</label>
184 </html>
185 <add>3.1</add>
186 </field>
187 <foreignKey>
188 <name>domain_id</name>
189 <table>civicrm_domain</table>
190 <key>id</key>
191 <add>3.1</add>
192 </foreignKey>
193 <field>
194 <name>visibility_id</name>
195 <title>Option Visibility</title>
196 <type>int unsigned</type>
197 <default>NULL</default>
198 <add>2.2</add>
199 <pseudoconstant>
200 <optionGroupName>visibility</optionGroupName>
201 </pseudoconstant>
202 </field>
203 <field>
204 <name>icon</name>
205 <title>Icon</title>
206 <type>varchar</type>
207 <length>255</length>
208 <default>NULL</default>
209 <comment>crm-i icon class</comment>
210 <add>4.7</add>
211 </field>
212 <field>
213 <name>color</name>
214 <title>Color</title>
215 <type>varchar</type>
216 <length>255</length>
217 <comment>Hex color value e.g. #ffffff</comment>
218 <default>NULL</default>
219 <add>4.7</add>
220 </field>
221 <index>
222 <name>index_option_group_id_value</name>
223 <fieldName length="128">value</fieldName>
224 <fieldName>option_group_id</fieldName>
225 <add>1.5</add>
226 </index>
227 <index>
228 <name>index_option_group_id_name</name>
229 <fieldName length="128">name</fieldName>
230 <fieldName>option_group_id</fieldName>
231 <add>2.2</add>
232 </index>
233 </table>