Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-03-23-44-14
[civicrm-core.git] / xml / schema / Contact / SubscriptionHistory.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
8f069c03
EM
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>
6a488035 15 <add>1.1</add>
8f069c03
EM
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 <html>
46 <type>Select</type>
47 </html>
48 </field>
49 <foreignKey>
50 <name>group_id</name>
51 <table>civicrm_group</table>
52 <key>id</key>
53 <add>1.1</add>
54 <onDelete>CASCADE</onDelete>
55 </foreignKey>
56 <field>
57 <name>date</name>
58 <type>datetime</type>
59 <required>true</required>
60 <comment>Date of the (un)subscription</comment>
61 <add>1.1</add>
62 </field>
63 <field>
64 <name>method</name>
65 <type>varchar</type>
66 <length>8</length>
67 <comment>How the (un)subscription was triggered</comment>
68 <pseudoconstant>
69 <callback>CRM_Core_SelectValues::getSubscriptionHistoryMethods</callback>
70 </pseudoconstant>
71 <add>1.1</add>
72 <html>
73 <type>Select</type>
74 </html>
75 </field>
76 <field>
77 <name>status</name>
78 <type>varchar</type>
79 <length>8</length>
80 <comment>The state of the contact within the group</comment>
81 <pseudoconstant>
82 <callback>CRM_Core_SelectValues::groupContactStatus</callback>
83 </pseudoconstant>
84 <add>1.1</add>
85 </field>
86 <field>
87 <name>tracking</name>
88 <type>varchar</type>
89 <length>255</length>
90 <comment>IP address or other tracking info</comment>
91 <add>1.1</add>
92 </field>
6a488035 93</table>