Merge remote-tracking branch 'upstream/4.3' into 4.3-master-2013-10-02-11-18-44
[civicrm-core.git] / xml / schema / Contact / SubscriptionHistory.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>SubscriptionHistory</class>
6 <name>civicrm_subscription_history</name>
7 <comment>History information of subscribe/unsubscribe actions</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Internal Id</comment>
15 <add>1.1</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>contact_id</name>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>Contact Id</comment>
26 <add>1.1</add>
27 </field>
28 <foreignKey>
29 <name>contact_id</name>
30 <table>civicrm_contact</table>
31 <key>id</key>
32 <add>1.1</add>
33 <onDelete>CASCADE</onDelete>
34 </foreignKey>
35 <field>
36 <name>group_id</name>
37 <type>int unsigned</type>
38 <comment>Group Id</comment>
39 <add>1.1</add>
40 <pseudoconstant>
41 <table>civicrm_group</table>
42 <keyColumn>id</keyColumn>
43 <labelColumn>title</labelColumn>
44 </pseudoconstant>
45 </field>
46 <foreignKey>
47 <name>group_id</name>
48 <table>civicrm_group</table>
49 <key>id</key>
50 <add>1.1</add>
51 <onDelete>CASCADE</onDelete>
52 </foreignKey>
53 <field>
54 <name>date</name>
55 <type>datetime</type>
56 <required>true</required>
57 <comment>Date of the (un)subscription</comment>
58 <add>1.1</add>
59 </field>
60 <field>
61 <name>method</name>
62 <type>enum</type>
63 <values>Admin, Email, Web, API</values>
64 <comment>How the (un)subscription was triggered</comment>
65 <add>1.1</add>
66 </field>
67 <field>
68 <name>status</name>
69 <type>enum</type>
70 <values>Added, Removed, Pending, Deleted</values>
71 <comment>The state of the contact within the group</comment>
72 <add>1.1</add>
73 </field>
74 <field>
75 <name>tracking</name>
76 <type>varchar</type>
77 <length>255</length>
78 <comment>IP address or other tracking info</comment>
79 <add>1.1</add>
80 </field>
81 </table>