CRM-13497 - Add html type to schema xml
[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>
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>
a3d8b390
CW
26 <pseudoconstant>
27 <table>civicrm_option_group</table>
28 <keyColumn>id</keyColumn>
29 <labelColumn>name</labelColumn>
30 </pseudoconstant>
6a488035
TO
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>
558ccc27 57 <change>3.3</change>
6a488035
TO
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>
7deea513 99 <html>
100 <type>TextArea</type>
101 </html>
102
6a488035
TO
103 <rows>8</rows>
104 <cols>60</cols>
105 <localizable>true</localizable>
106 <comment>Optional description.</comment>
107 <add>1.5</add>
108 </field>
109 <field>
110 <name>is_optgroup</name>
111 <type>boolean</type>
112 <default>0</default>
113 <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>
114 <add>1.5</add>
115 </field>
116 <field>
117 <name>is_reserved</name>
118 <type>boolean</type>
119 <default>0</default>
120 <comment>Is this a predefined system object?</comment>
121 <add>1.5</add>
122 </field>
123 <field>
124 <name>is_active</name>
125 <type>boolean</type>
126 <default>1</default>
127 <comment>Is this option active?</comment>
128 <add>1.5</add>
129 </field>
130 <field>
131 <name>component_id</name>
132 <type>int unsigned</type>
133 <comment>Component that this option value belongs/caters to.</comment>
c87bbced 134 <add>2.0</add>
135 <pseudoconstant>
c87bbced 136 <table>civicrm_component</table>
137 <keyColumn>id</keyColumn>
138 <labelColumn>name</labelColumn>
139 </pseudoconstant>
6a488035
TO
140 </field>
141 <foreignKey>
142 <name>component_id</name>
143 <table>civicrm_component</table>
144 <key>id</key>
145 <add>2.0</add>
558ccc27 146 </foreignKey>
6a488035
TO
147 <field>
148 <name>domain_id</name>
149 <type>int unsigned</type>
150 <comment>Which Domain is this option value for</comment>
151 <add>3.1</add>
152 </field>
153 <foreignKey>
154 <name>domain_id</name>
155 <table>civicrm_domain</table>
156 <key>id</key>
157 <add>3.1</add>
158 </foreignKey>
159 <field>
160 <name>visibility_id</name>
161 <type>int unsigned</type>
162 <default>NULL</default>
163 <add>2.2</add>
164 </field>
165 <index>
166 <name>index_option_group_id_value</name>
558ccc27 167 <fieldName length="128">value</fieldName>
6a488035
TO
168 <fieldName>option_group_id</fieldName>
169 <add>1.5</add>
170 </index>
171 <index>
172 <name>index_option_group_id_name</name>
558ccc27 173 <fieldName length="128">name</fieldName>
6a488035 174 <fieldName>option_group_id</fieldName>
6a488035
TO
175 <add>2.2</add>
176 </index>
177</table>