Merge pull request #19017 from eileenmcnaughton/remove_recur
[civicrm-core.git] / xml / schema / Mailing / Recipients.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Mailing</base>
5 <class>Recipients</class>
6 <name>civicrm_mailing_recipients</name>
7 <comment>Stores information about the recipients of a mailing.</comment>
8 <archive>true</archive>
9 <component>CiviMail</component>
10 <field>
11 <name>id</name>
12 <title>Mailing Recipients ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>mailing_id</name>
22 <title>Mailing</title>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>The ID of the mailing this Job will send.</comment>
26 </field>
27 <foreignKey>
28 <name>mailing_id</name>
29 <table>civicrm_mailing</table>
30 <key>id</key>
31 <onDelete>CASCADE</onDelete>
32 </foreignKey>
33 <field>
34 <name>contact_id</name>
35 <title>Mailing Recipient</title>
36 <type>int unsigned</type>
37 <required>true</required>
38 <comment>FK to Contact</comment>
39 </field>
40 <foreignKey>
41 <name>contact_id</name>
42 <table>civicrm_contact</table>
43 <key>id</key>
44 <onDelete>CASCADE</onDelete>
45 </foreignKey>
46 <field>
47 <name>email_id</name>
48 <title>Recipient Email</title>
49 <type>int unsigned</type>
50 <default>NULL</default>
51 <comment>FK to Email</comment>
52 </field>
53 <foreignKey>
54 <name>email_id</name>
55 <table>civicrm_email</table>
56 <key>id</key>
57 <onDelete>SET NULL</onDelete>
58 </foreignKey>
59 <field>
60 <name>phone_id</name>
61 <title>Recipient Phone</title>
62 <type>int unsigned</type>
63 <default>NULL</default>
64 <comment>FK to Phone</comment>
65 </field>
66 <foreignKey>
67 <name>phone_id</name>
68 <table>civicrm_phone</table>
69 <key>id</key>
70 <onDelete>SET NULL</onDelete>
71 </foreignKey>
72 </table>