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