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