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

<table>
  <base>CRM/Core</base>
  <class>CustomGroup</class>
  <name>civicrm_custom_group</name>
  <comment>All extended (custom) properties are associated with a group. These are logical sets of related data.
  </comment>
  <add>1.1</add>
  <log>true</log>
  <title>Custom Field Group</title>
  <labelField>title</labelField>
  <paths>
    <add>civicrm/admin/custom/group/edit?action=add&amp;reset=1</add>
    <update>civicrm/admin/custom/group/edit?action=update&amp;reset=1&amp;id=[id]</update>
    <preview>civicrm/admin/custom/group/preview?reset=1&amp;gid=[id]</preview>
    <delete>civicrm/admin/custom/group/delete?reset=1&amp;id=[id]</delete>
    <browse>civicrm/admin/custom/group</browse>
  </paths>
  <field>
    <name>id</name>
    <type>int unsigned</type>
    <title>Custom Group ID</title>
    <required>true</required>
    <comment>Unique Custom Group ID</comment>
    <html>
      <type>Number</type>
    </html>
    <add>1.1</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>name</name>
    <type>varchar</type>
    <title>Custom Group Name</title>
    <length>64</length>
    <comment>Variable name/programmatic handle for this group.</comment>
    <add>1.1</add>
  </field>
  <field>
    <name>title</name>
    <type>varchar</type>
    <title>Custom Group Title</title>
    <length>64</length>
    <required>true</required>
    <localizable>true</localizable>
    <comment>Friendly Name.</comment>
    <add>1.1</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>extends</name>
    <type>varchar</type>
    <title>Custom Group Extends</title>
    <length>255</length>
    <default>'Contact'</default>
    <comment>Type of object this group extends (can add other options later e.g. contact_address, etc.).</comment>
    <add>1.1</add>
    <pseudoconstant>
      <callback>CRM_Core_BAO_CustomGroup::getCustomGroupExtendsOptions</callback>
      <suffixes>name,label,grouping,icon</suffixes>
    </pseudoconstant>
    <html>
      <type>Select</type>
    </html>
  </field>
  <field>
    <name>extends_entity_column_id</name>
    <type>int unsigned</type>
    <title>Custom Group Subtype List</title>
    <default>NULL</default>
    <comment>FK to civicrm_option_value.value (for option group custom_data_type)</comment>
    <pseudoconstant>
      <callback>CRM_Core_BAO_CustomGroup::getExtendsEntityColumnIdOptions</callback>
      <suffixes>name,label,grouping</suffixes>
    </pseudoconstant>
    <add>2.2</add>
    <html>
      <type>ChainSelect</type>
      <controlField>extends</controlField>
    </html>
  </field>
  <field>
    <name>extends_entity_column_value</name>
    <type>varchar</type>
    <title>Custom Group Subtype</title>
    <length>255</length>
    <comment>linking custom group for dynamic object</comment>
    <serialize>SEPARATOR_BOOKEND</serialize>
    <pseudoconstant>
      <callback>CRM_Core_BAO_CustomGroup::getExtendsEntityColumnValueOptions</callback>
    </pseudoconstant>
    <html>
      <type>ChainSelect</type>
      <controlField>extends_entity_column_id</controlField>
    </html>
    <add>1.6</add>
  </field>
  <field>
    <name>style</name>
    <type>varchar</type>
    <title>Custom Group Style</title>
    <length>15</length>
    <comment>Visual relationship between this form and its parent.</comment>
    <pseudoconstant>
      <callback>CRM_Core_SelectValues::customGroupStyle</callback>
    </pseudoconstant>
    <add>1.1</add>
    <html>
      <type>Select</type>
    </html>
  </field>
  <field>
    <name>collapse_display</name>
    <type>boolean</type>
    <title>Collapse Custom Group?</title>
    <default>0</default>
    <required>true</required>
    <comment>Will this group be in collapsed or expanded mode on initial display ?</comment>
    <add>1.1</add>
  </field>
  <field>
    <name>help_pre</name>
    <type>text</type>
    <title>Custom Group Pre Text</title>
    <localizable>true</localizable>
    <comment>Description and/or help text to display before fields in form.</comment>
    <html>
      <type>TextArea</type>
      <rows>4</rows>
      <cols>80</cols>
    </html>
    <add>1.1</add>
  </field>
  <field>
    <name>help_post</name>
    <type>text</type>
    <title>Custom Group Post Text</title>
    <localizable>true</localizable>
    <comment>Description and/or help text to display after fields in form.</comment>
    <html>
      <type>TextArea</type>
      <rows>4</rows>
      <cols>80</cols>
    </html>
    <add>1.1</add>
  </field>
  <field>
    <name>weight</name>
    <type>int</type>
    <title>Order</title>
    <required>true</required>
    <default>1</default>
    <comment>Controls display order when multiple extended property groups are setup for the same class.</comment>
    <add>1.1</add>
  </field>
  <field>
    <name>is_active</name>
    <type>boolean</type>
    <title>Custom Group Is Active?</title>
    <comment>Is this property active?</comment>
    <html>
      <type>CheckBox</type>
      <label>Enabled</label>
    </html>
    <default>1</default>
    <required>true</required>
    <add>1.1</add>
  </field>
  <field>
    <name>table_name</name>
    <type>varchar</type>
    <length>255</length>
    <comment>Name of the table that holds the values for this group.</comment>
    <html>
      <label>Table Name</label>
    </html>
    <readonly>true</readonly>
    <add>2.0</add>
  </field>
  <field>
    <name>is_multiple</name>
    <type>boolean</type>
    <title>Supports Multiple Records</title>
    <comment>Does this group hold multiple values?</comment>
    <default>0</default>
    <required>true</required>
    <add>2.0</add>
  </field>
  <field>
    <name>min_multiple</name>
    <type>int unsigned</type>
    <title>Minimum Multiple Records</title>
    <comment>minimum number of multiple records (typically 0?)</comment>
    <add>2.2</add>
  </field>
  <field>
    <name>max_multiple</name>
    <type>int unsigned</type>
    <title>Maximum Multiple Records</title>
    <comment>maximum number of multiple records, if 0 - no max</comment>
    <add>2.2</add>
  </field>
  <field>
    <name>collapse_adv_display</name>
    <type>boolean</type>
    <title>Collapse Group Display</title>
    <default>0</default>
    <required>true</required>
    <comment>Will this group be in collapsed or expanded mode on advanced search display ?</comment>
    <add>3.0</add>
  </field>
  <index>
    <name>UI_title_extends</name>
    <fieldName>title</fieldName>
    <fieldName>extends</fieldName>
    <unique>true</unique>
    <add>2.1</add>
  </index>
  <index>
    <name>UI_name</name>
    <fieldName>name</fieldName>
    <unique>true</unique>
    <add>5.47</add>
  </index>
  <field>
    <name>created_id</name>
    <type>int unsigned</type>
    <title>Created By Contact ID</title>
    <comment>FK to civicrm_contact, who created this custom group</comment>
    <html>
      <label>Created By</label>
    </html>
    <add>3.0</add>
  </field>
  <foreignKey>
    <name>created_id</name>
    <table>civicrm_contact</table>
    <key>id</key>
    <add>3.0</add>
    <onDelete>SET NULL</onDelete>
  </foreignKey>
  <field>
    <name>created_date</name>
    <type>datetime</type>
    <title>Custom Group Created Date</title>
    <comment>Date and time this custom group was created.</comment>
    <add>3.0</add>
  </field>
  <field>
    <name>is_reserved</name>
    <type>boolean</type>
    <title>Reserved Group?</title>
    <default>0</default>
    <required>true</required>
    <comment>Is this a reserved Custom Group?</comment>
    <add>4.4</add>
  </field>
  <field>
    <name>is_public</name>
    <type>boolean</type>
    <title>Custom Group Is Public?</title>
    <default>1</default>
    <required>true</required>
    <comment>Is this property public?</comment>
    <add>4.7</add>
  </field>
  <field>
    <name>icon</name>
    <title>Icon</title>
    <type>varchar</type>
    <length>255</length>
    <default>NULL</default>
    <comment>crm-i icon class</comment>
    <add>5.28</add>
  </field>
</table>
