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

<table>
  <base>CRM/Queue</base>
  <class>Queue</class>
  <name>civicrm_queue</name>
  <comment>Stores a list of persistent queues</comment>
  <add>5.47</add>
  <field>
    <name>id</name>
    <title>System Queue ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <html>
      <type>Number</type>
    </html>
    <add>5.47</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>name</name>
    <title>Name</title>
    <type>varchar</type>
    <length>64</length>
    <comment>Name of the queue</comment>
    <required>true</required>
    <html>
      <type>Text</type>
    </html>
    <add>5.47</add>
  </field>
  <index>
    <name>UI_name</name>
    <fieldName>name</fieldName>
    <unique>true</unique>
    <add>5.47</add>
  </index>
  <field>
    <name>type</name>
    <title>Type</title>
    <type>varchar</type>
    <length>64</length>
    <comment>Type of the queue</comment>
    <required>true</required>
    <html>
      <type>Text</type>
    </html>
    <add>5.47</add>
    <pseudoconstant>
      <callback>CRM_Queue_BAO_Queue::getTypes</callback>
    </pseudoconstant>
  </field>
  <field>
    <name>is_autorun</name>
    <title>Enable Autorun</title>
    <type>boolean</type>
    <comment>Should the standard background attempt to autorun tasks in this queue?</comment>
    <html>
      <type>CheckBox</type>
      <label>Auto Run</label>
    </html>
    <drop>5.48</drop>
  </field>
  <field>
    <name>runner</name>
    <title>Runner</title>
    <type>varchar</type>
    <length>64</length>
    <required>false</required>
    <comment>Name of the task runner</comment>
    <html>
      <type>Text</type>
    </html>
    <add>5.48</add>
  </field>
  <field>
    <name>batch_limit</name>
    <title>Batch Limit</title>
    <type>int unsigned</type>
    <required>true</required>
    <default>1</default>
    <comment>Maximum number of items in a batch.</comment>
    <add>5.48</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>lease_time</name>
    <title>Lease Time</title>
    <type>int unsigned</type>
    <required>true</required>
    <default>3600</default>
    <comment>When claiming an item (or batch of items) for work, how long should the item(s) be reserved. (Seconds)</comment>
    <add>5.48</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>retry_limit</name>
    <title>Retry Limit</title>
    <comment>Number of permitted retries. Set to zero (0) to disable.</comment>
    <type>int</type>
    <required>true</required>
    <default>0</default>
    <html>
      <type>Text</type>
    </html>
    <add>5.48</add>
  </field>
  <field>
    <name>retry_interval</name>
    <title>Retry Interval</title>
    <comment>Number of seconds to wait before retrying a failed execution.</comment>
    <type>int</type>
    <required>false</required>
    <html>
      <type>Text</type>
    </html>
    <add>5.48</add>
  </field>
  <field>
    <name>status</name>
    <title>Status</title>
    <type>varchar</type>
    <length>16</length>
    <comment>Execution status</comment>
    <required>false</required>
    <default>'active'</default>
    <html>
      <type>Text</type>
    </html>
    <add>5.51</add>
    <pseudoconstant>
      <callback>CRM_Queue_BAO_Queue::getStatuses</callback>
    </pseudoconstant>
  </field>
  <field>
    <name>error</name>
    <title>Error Mode</title>
    <type>varchar</type>
    <length>16</length>
    <comment>Fallback behavior for unhandled errors</comment>
    <required>false</required>
    <html>
      <type>Text</type>
    </html>
    <add>5.51</add>
    <pseudoconstant>
      <callback>CRM_Queue_BAO_Queue::getErrorModes</callback>
    </pseudoconstant>
  </field>
  <field>
    <name>is_template</name>
    <title>Is Template</title>
    <type>boolean</type>
    <required>true</required>
    <default>0</default>
    <comment>Is this a template configuration (for use by other/future queues)?</comment>
    <html>
      <type>CheckBox</type>
      <label>Is Template</label>
    </html>
    <add>5.51</add>
  </field>
</table>
