Revert "Schema - Fix boolean fields in various tables"
[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 <title>Group Membership History ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Internal ID</comment>
16 <html>
17 <type>Number</type>
18 </html>
19 <add>1.1</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>contact_id</name>
27 <title>Contact ID</title>
28 <type>int unsigned</type>
29 <required>true</required>
30 <comment>Contact ID</comment>
31 <html>
32 <label>Contact</label>
33 </html>
34 <add>1.1</add>
35 </field>
36 <foreignKey>
37 <name>contact_id</name>
38 <table>civicrm_contact</table>
39 <key>id</key>
40 <add>1.1</add>
41 <onDelete>CASCADE</onDelete>
42 </foreignKey>
43 <field>
44 <name>group_id</name>
45 <title>Group ID</title>
46 <type>int unsigned</type>
47 <comment>Group ID</comment>
48 <add>1.1</add>
49 <pseudoconstant>
50 <table>civicrm_group</table>
51 <keyColumn>id</keyColumn>
52 <labelColumn>title</labelColumn>
53 </pseudoconstant>
54 <html>
55 <type>Select</type>
56 <label>Group</label>
57 </html>
58 </field>
59 <foreignKey>
60 <name>group_id</name>
61 <table>civicrm_group</table>
62 <key>id</key>
63 <add>1.1</add>
64 <onDelete>CASCADE</onDelete>
65 </foreignKey>
66 <field>
67 <name>date</name>
68 <title>Group Membership Action Date</title>
69 <type>timestamp</type>
70 <required>true</required>
71 <default>CURRENT_TIMESTAMP</default>
72 <comment>Date of the (un)subscription</comment>
73 <add>1.1</add>
74 </field>
75 <field>
76 <name>method</name>
77 <title>Group Membership Action</title>
78 <type>varchar</type>
79 <length>8</length>
80 <comment>How the (un)subscription was triggered</comment>
81 <pseudoconstant>
82 <callback>CRM_Core_SelectValues::getSubscriptionHistoryMethods</callback>
83 </pseudoconstant>
84 <add>1.1</add>
85 <html>
86 <type>Select</type>
87 </html>
88 </field>
89 <field>
90 <name>status</name>
91 <title>Group Membership Status</title>
92 <type>varchar</type>
93 <length>8</length>
94 <comment>The state of the contact within the group</comment>
95 <pseudoconstant>
96 <callback>CRM_Core_SelectValues::groupContactStatus</callback>
97 </pseudoconstant>
98 <add>1.1</add>
99 </field>
100 <field>
101 <name>tracking</name>
102 <title>Group Membership Tracking</title>
103 <type>varchar</type>
104 <length>255</length>
105 <comment>IP address or other tracking info</comment>
106 <add>1.1</add>
107 </field>
108 </table>