CRM-13497 - Move rows and cols
[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 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Option ID</comment>
14 <add>1.5</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>option_group_id</name>
22 <type>int unsigned</type>
23 <required>true</required>
24 <comment>Group which this option belongs to.</comment>
25 <add>1.5</add>
26 <pseudoconstant>
27 <table>civicrm_option_group</table>
28 <keyColumn>id</keyColumn>
29 <labelColumn>name</labelColumn>
30 </pseudoconstant>
31 </field>
32 <foreignKey>
33 <name>option_group_id</name>
34 <table>civicrm_option_group</table>
35 <key>id</key>
36 <add>1.5</add>
37 <onDelete>CASCADE</onDelete>
38 </foreignKey>
39 <field>
40 <name>label</name>
41 <title>Option Label</title>
42 <type>varchar</type>
43 <required>true</required>
44 <length>255</length>
45 <localizable>true</localizable>
46 <comment>Option string as displayed to users - e.g. the label in an HTML OPTION tag.</comment>
47 <add>1.5</add>
48 </field>
49 <field>
50 <name>value</name>
51 <title>Option Value</title>
52 <type>varchar</type>
53 <length>512</length>
54 <required>true</required>
55 <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>
56 <add>1.5</add>
57 <change>3.3</change>
58 </field>
59 <field>
60 <name>name</name>
61 <title>Option Name</title>
62 <type>varchar</type>
63 <length>255</length>
64 <import>true</import>
65 <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>
66 <add>1.5</add>
67 </field>
68 <field>
69 <name>grouping</name>
70 <title>Option Grouping Name</title>
71 <type>varchar</type>
72 <length>255</length>
73 <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>
74 <add>1.5</add>
75 </field>
76 <field>
77 <name>filter</name>
78 <type>int unsigned</type>
79 <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment>
80 <add>1.5</add>
81 </field>
82 <field>
83 <name>is_default</name>
84 <type>boolean</type>
85 <default>0</default>
86 <comment>Is this the default option for the group?</comment>
87 <add>1.5</add>
88 </field>
89 <field>
90 <name>weight</name>
91 <type>int unsigned</type>
92 <required>true</required>
93 <comment>Controls display sort order.</comment>
94 <add>1.5</add>
95 </field>
96 <field>
97 <name>description</name>
98 <type>text</type>
99 <html>
100 <type>TextArea</type>
101 <rows>8</rows>
102 <cols>60</cols>
103 </html>
104 <localizable>true</localizable>
105 <comment>Optional description.</comment>
106 <add>1.5</add>
107 </field>
108 <field>
109 <name>is_optgroup</name>
110 <type>boolean</type>
111 <default>0</default>
112 <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>
113 <add>1.5</add>
114 </field>
115 <field>
116 <name>is_reserved</name>
117 <type>boolean</type>
118 <default>0</default>
119 <comment>Is this a predefined system object?</comment>
120 <add>1.5</add>
121 </field>
122 <field>
123 <name>is_active</name>
124 <type>boolean</type>
125 <default>1</default>
126 <comment>Is this option active?</comment>
127 <add>1.5</add>
128 </field>
129 <field>
130 <name>component_id</name>
131 <type>int unsigned</type>
132 <comment>Component that this option value belongs/caters to.</comment>
133 <add>2.0</add>
134 <pseudoconstant>
135 <table>civicrm_component</table>
136 <keyColumn>id</keyColumn>
137 <labelColumn>name</labelColumn>
138 </pseudoconstant>
139 </field>
140 <foreignKey>
141 <name>component_id</name>
142 <table>civicrm_component</table>
143 <key>id</key>
144 <add>2.0</add>
145 </foreignKey>
146 <field>
147 <name>domain_id</name>
148 <type>int unsigned</type>
149 <comment>Which Domain is this option value for</comment>
150 <add>3.1</add>
151 </field>
152 <foreignKey>
153 <name>domain_id</name>
154 <table>civicrm_domain</table>
155 <key>id</key>
156 <add>3.1</add>
157 </foreignKey>
158 <field>
159 <name>visibility_id</name>
160 <type>int unsigned</type>
161 <default>NULL</default>
162 <add>2.2</add>
163 </field>
164 <index>
165 <name>index_option_group_id_value</name>
166 <fieldName length="128">value</fieldName>
167 <fieldName>option_group_id</fieldName>
168 <add>1.5</add>
169 </index>
170 <index>
171 <name>index_option_group_id_name</name>
172 <fieldName length="128">name</fieldName>
173 <fieldName>option_group_id</fieldName>
174 <add>2.2</add>
175 </index>
176 </table>