CRM-13497 - getting there on main tables
[civicrm-core.git] / xml / schema / Mailing / Event / Subscribe.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Mailing/Event</base>
5 <class>Subscribe</class>
6 <name>civicrm_mailing_event_subscribe</name>
7 <comment>Tracks when a (new) contact subscribes to a group by email</comment>
8 <archive>true</archive>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 </field>
14 <primaryKey>
15 <name>id</name>
16 <autoincrement>true</autoincrement>
17 </primaryKey>
18 <field>
29494eef
AS
19 <name>group_id</name>
20 <type>int unsigned</type>
21 <required>true</required>
22 <comment>FK to Group</comment>
23 <pseudoconstant>
24 <table>civicrm_group</table>
25 <keyColumn>id</keyColumn>
26 <labelColumn>title</labelColumn>
27 </pseudoconstant>
614d72ec 28 <html>
29 <type>Select></type>
30 </html>
6a488035
TO
31 </field>
32 <foreignKey>
33 <name>group_id</name>
34 <table>civicrm_group</table>
35 <key>id</key>
36 <onDelete>CASCADE</onDelete>
37 </foreignKey>
38 <field>
39 <name>contact_id</name>
40 <type>int unsigned</type>
41 <required>true</required>
42 <comment>FK to Contact</comment>
43 </field>
44 <foreignKey>
45 <name>contact_id</name>
46 <table>civicrm_contact</table>
47 <key>id</key>
48 <onDelete>CASCADE</onDelete>
49 </foreignKey>
50 <field>
51 <name>hash</name>
52 <type>varchar</type>
53 <length>255</length>
54 <required>true</required>
55 <comment>Security hash</comment>
56 </field>
57 <field>
58 <name>time_stamp</name>
59 <type>datetime</type>
60 <required>true</required>
61 <comment>When this subscription event occurred.</comment>
62 </field>
63</table>