Merge pull request #2519 from jitendrapurohit/CRM-13833
[civicrm-core.git] / xml / schema / Contact / SubscriptionHistory.xml
CommitLineData
6a488035
TO
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>
29494eef
AS
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>
614d72ec 45 <html>
e0991796 46 <type>Select</type>
614d72ec 47 </html>
6a488035
TO
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>
dc73c80d 65 <type>varchar</type>
66 <length>8</length>
6a488035
TO
67 <comment>How the (un)subscription was triggered</comment>
68 <add>1.1</add>
614d72ec 69 <html>
70 <type>Select</type>
71 </html>
6a488035
TO
72 </field>
73 <field>
74 <name>status</name>
dc73c80d 75 <type>varchar</type>
76 <length>8</length>
6a488035
TO
77 <comment>The state of the contact within the group</comment>
78 <add>1.1</add>
79 </field>
80 <field>
81 <name>tracking</name>
82 <type>varchar</type>
83 <length>255</length>
84 <comment>IP address or other tracking info</comment>
85 <add>1.1</add>
86 </field>
87</table>