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

<table>
  <base>CRM/Contribute</base>
  <class>ContributionProduct</class>
  <name>civicrm_contribution_product</name>
  <add>1.4</add>
  <log>true</log>
  <component>CiviContribute</component>
  <field>
    <name>id</name>
    <title>Contribution Product ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <html>
      <type>Number</type>
    </html>
    <add>1.4</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>product_id</name>
    <title>Product ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <add>1.4</add>
  </field>
  <foreignKey>
    <name>product_id</name>
    <table>civicrm_product</table>
    <key>id</key>
    <add>5.39</add>
    <onDelete>CASCADE</onDelete>
  </foreignKey>
  <field>
    <name>contribution_id</name>
    <title>Contribution ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <html>
      <label>Contribution</label>
      <type>EntityRef</type>
    </html>
    <add>1.4</add>
  </field>
  <foreignKey>
    <name>contribution_id</name>
    <table>civicrm_contribution</table>
    <key>id</key>
    <add>1.4</add>
    <onDelete>CASCADE</onDelete>
  </foreignKey>
  <field>
    <name>product_option</name>
    <title>Product Option</title>
    <type>varchar</type>
    <length>255</length>
    <export>true</export>
    <comment>Option value selected if applicable - e.g. color, size etc.</comment>
    <add>1.4</add>
  </field>
  <field>
    <name>quantity</name>
    <title>Quantity</title>
    <type>int</type>
    <export>true</export>
    <comment></comment>
    <add>1.4</add>
  </field>
  <field>
    <name>fulfilled_date</name>
    <type>date</type>
    <title>Fulfilled Date</title>
    <export>true</export>
    <comment>Optional. Can be used to record the date this product was fulfilled or shipped.</comment>
    <add>1.4</add>
    <html>
      <type>Select Date</type>
      <formatType>activityDate</formatType>
    </html>
  </field>
  <field>
    <name>start_date</name>
    <uniqueName>contribution_start_date</uniqueName>
    <title>Start date for premium</title>
    <type>date</type>
    <export>true</export>
    <comment>Actual start date for a time-delimited premium (subscription, service or membership)</comment>
    <add>1.4</add>
  </field>
  <field>
    <name>end_date</name>
    <uniqueName>contribution_end_date</uniqueName>
    <type>date</type>
    <title>End date for premium</title>
    <export>true</export>
    <comment>Actual end date for a time-delimited premium (subscription, service or membership)</comment>
    <add>1.4</add>
  </field>
  <field>
    <name>comment</name>
    <title>Premium comment</title>
    <type>text</type>
    <add>1.4</add>
  </field>
  <field>
    <name>financial_type_id</name>
    <title>Financial Type ID</title>
    <type>int unsigned</type>
    <default>NULL</default>
    <pseudoconstant>
      <table>civicrm_financial_type</table>
      <keyColumn>id</keyColumn>
      <labelColumn>name</labelColumn>
    </pseudoconstant>
    <comment>FK to Financial Type(for membership price sets only).</comment>
    <html>
      <label>Financial Type</label>
    </html>
    <add>4.3</add>
  </field>
  <foreignKey>
    <name>financial_type_id</name>
    <table>civicrm_financial_type</table>
    <key>id</key>
    <onDelete>SET NULL</onDelete>
    <add>4.3</add>
  </foreignKey>
</table>
