Merge pull request #17168 from colemanw/contactFieldPerms
[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 <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment>
86 <add>1.5</add>
87 </field>
88 <field>
89 <name>is_default</name>
90 <title>Option is Default?</title>
91 <type>boolean</type>
92 <default>0</default>
93 <comment>Is this the default option for the group?</comment>
94 <add>1.5</add>
95 </field>
96 <field>
97 <name>weight</name>
98 <title>Order</title>
99 <type>int unsigned</type>
100 <required>true</required>
101 <comment>Controls display sort order.</comment>
102 <add>1.5</add>
103 </field>
104 <field>
105 <name>description</name>
106 <title>Option Description</title>
107 <type>text</type>
108 <html>
109 <type>TextArea</type>
110 <rows>8</rows>
111 <cols>60</cols>
112 </html>
113 <localizable>true</localizable>
114 <comment>Optional description.</comment>
115 <add>1.5</add>
116 </field>
117 <field>
118 <name>is_optgroup</name>
119 <title>Option is Header?</title>
120 <type>boolean</type>
121 <default>0</default>
122 <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>
123 <add>1.5</add>
124 </field>
125 <field>
126 <name>is_reserved</name>
127 <title>Option Is Reserved?</title>
128 <type>boolean</type>
129 <default>0</default>
130 <comment>Is this a predefined system object?</comment>
131 <add>1.5</add>
132 </field>
133 <field>
134 <name>is_active</name>
135 <title>Option Is Active</title>
136 <type>boolean</type>
137 <default>1</default>
138 <comment>Is this option active?</comment>
139 <add>1.5</add>
140 </field>
141 <field>
142 <name>component_id</name>
143 <title>Option Component</title>
144 <type>int unsigned</type>
145 <comment>Component that this option value belongs/caters to.</comment>
146 <add>2.0</add>
147 <pseudoconstant>
148 <table>civicrm_component</table>
149 <keyColumn>id</keyColumn>
150 <labelColumn>name</labelColumn>
151 </pseudoconstant>
152 <html>
153 <type>Select</type>
154 </html>
155 </field>
156 <foreignKey>
157 <name>component_id</name>
158 <table>civicrm_component</table>
159 <key>id</key>
160 <add>2.0</add>
161 </foreignKey>
162 <field>
163 <name>domain_id</name>
164 <title>Option Domain</title>
165 <type>int unsigned</type>
166 <pseudoconstant>
167 <table>civicrm_domain</table>
168 <keyColumn>id</keyColumn>
169 <labelColumn>name</labelColumn>
170 </pseudoconstant>
171 <comment>Which Domain is this option value for</comment>
172 <add>3.1</add>
173 </field>
174 <foreignKey>
175 <name>domain_id</name>
176 <table>civicrm_domain</table>
177 <key>id</key>
178 <add>3.1</add>
179 </foreignKey>
180 <field>
181 <name>visibility_id</name>
182 <title>Option Visibility</title>
183 <type>int unsigned</type>
184 <default>NULL</default>
185 <add>2.2</add>
186 <pseudoconstant>
187 <optionGroupName>visibility</optionGroupName>
188 </pseudoconstant>
189 </field>
190 <field>
191 <name>icon</name>
192 <title>Icon</title>
193 <type>varchar</type>
194 <length>255</length>
195 <default>NULL</default>
196 <comment>crm-i icon class</comment>
197 <add>4.7</add>
198 </field>
199 <field>
200 <name>color</name>
201 <title>Color</title>
202 <type>varchar</type>
203 <length>255</length>
204 <comment>Hex color value e.g. #ffffff</comment>
205 <default>NULL</default>
206 <add>4.7</add>
207 </field>
208 <index>
209 <name>index_option_group_id_value</name>
210 <fieldName length="128">value</fieldName>
211 <fieldName>option_group_id</fieldName>
212 <add>1.5</add>
213 </index>
214 <index>
215 <name>index_option_group_id_name</name>
216 <fieldName length="128">name</fieldName>
217 <fieldName>option_group_id</fieldName>
218 <add>2.2</add>
219 </index>
220 </table>