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

<table>
  <base>CRM/SMS</base>
  <class>History</class>
  <name>civicrm_sms_history</name>
  <comment>SMS History can be linked to any object in the application.</comment>
  <add>1.4</add>
  <drop>2.0</drop>
  <field>
    <name>id</name>
    <type>int unsigned</type>
    <required>true</required>
    <comment>SMS History ID</comment>
    <html>
      <type>Number</type>
      <label>SMS History ID</label>
    </html>
    <add>1.4</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>message</name>
    <type>text</type>
    <comment>Contents of the SMS.</comment>
    <html>
      <type>TextArea</type>
      <rows>5</rows>
      <cols>80</cols>
      <label>Message</label>
    </html>
    <add>1.4</add>
  </field>
  <field>
    <name>contact_id</name>
    <title>Contact ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <comment>FK to Contact who is sending this SMS</comment>
    <add>1.4</add>
    <html>
      <type>EntityRef</type>
      <label>Contact</label>
    </html>
  </field>
  <foreignKey>
    <name>contact_id</name>
    <table>civicrm_contact</table>
    <key>id</key>
    <add>1.4</add>
  </foreignKey>
  <field>
    <name>sent_date</name>
    <type>date</type>
    <comment>When was this SMS sent</comment>
    <html>
      <label>Sent Date</label>
    </html>
    <add>1.4</add>
  </field>
</table>
