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