<?xml version="1.0" encoding="iso-8859-1" ?>

<table>
  <base>CRM/Core</base>
  <class>OptionGroup</class>
  <name>civicrm_option_group</name>
  <add>1.5</add>
  <log>true</log>
  <paths>
    <add>civicrm/admin/options?action=add&amp;reset=1</add>
    <update>civicrm/admin/options?action=update&amp;reset=1&amp;id=[id]</update>
  </paths>
  <field>
    <name>id</name>
    <title>Option Group ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <comment>Option Group ID</comment>
    <html>
      <type>Number</type>
    </html>
    <add>1.5</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>name</name>
    <title>Option Group Name</title>
    <type>varchar</type>
    <length>64</length>
    <required>true</required>
    <comment>Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.</comment>
    <add>1.5</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>title</name>
    <title>Option Group Title</title>
    <type>varchar</type>
    <length>255</length>
    <localizable>true</localizable>
    <comment>Option Group title.</comment>
    <add>1.5</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>description</name>
    <title>Option Group Description</title>
    <type>text</type>
    <localizable>true</localizable>
    <comment>Option group description.</comment>
    <add>1.5</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>data_type</name>
    <title>Data Type</title>
    <type>varchar</type>
    <length>128</length>
    <comment>Type of data stored by this option group.</comment>
    <pseudoconstant>
      <callback>CRM_Utils_Type::dataTypes</callback>
    </pseudoconstant>
    <add>4.7</add>
  </field>
  <field>
    <name>is_reserved</name>
    <title>Option Group Is Reserved</title>
    <type>boolean</type>
    <default>1</default>
    <required>true</required>
    <comment>Is this a predefined system option group (i.e. it can not be deleted)?</comment>
    <add>1.5</add>
    <html>
      <type>CheckBox</type>
      <label>Reserved</label>
    </html>
  </field>
  <field>
    <name>is_active</name>
    <title>Enabled</title>
    <type>boolean</type>
    <default>1</default>
    <required>true</required>
    <html>
      <type>CheckBox</type>
      <label>Enabled</label>
    </html>
    <comment>Is this option group active?</comment>
    <add>1.5</add>
  </field>
  <field>
    <name>is_locked</name>
    <title>Option Group Is Locked</title>
    <default>0</default>
    <type>boolean</type>
    <required>true</required>
    <comment>A lock to remove the ability to add new options via the UI.</comment>
    <add>4.5</add>
    <html>
      <type>CheckBox</type>
      <label>Locked</label>
    </html>
  </field>
  <field>
    <name>option_value_fields</name>
    <title>Option Value Fields</title>
    <type>varchar</type>
    <length>128</length>
    <default>"name,label,description"</default>
    <comment>Which optional columns from the option_value table are in use by this group.</comment>
    <pseudoconstant>
      <callback>CRM_Core_SelectValues::optionValueFields</callback>
    </pseudoconstant>
    <serialize>COMMA</serialize>
    <add>5.49</add>
  </field>
  <index>
    <name>UI_name</name>
    <fieldName>name</fieldName>
    <unique>true</unique>
    <add>2.1</add>
  </index>
</table>
