Merge pull request #22724 from braders/feature/group-search-null-columns
[civicrm-core.git] / xml / schema / Core / Email.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Core</base>
5 <class>Email</class>
6 <name>civicrm_email</name>
7 <comment>Email information for a specific location.</comment>
8 <add>1.1</add>
9 <log>true</log>
449c4e6b 10 <icon>fa-envelope-o</icon>
8ab43c93 11 <labelField>email</labelField>
6a488035 12 <field>
ebc23aab 13 <name>id</name>
53780a9b 14 <title>Email ID</title>
ebc23aab
EM
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Unique Email ID</comment>
0481e12c
A
18 <html>
19 <type>Number</type>
20 </html>
ebc23aab 21 <add>1.1</add>
6a488035
TO
22 </field>
23 <primaryKey>
ebc23aab
EM
24 <name>id</name>
25 <autoincrement>true</autoincrement>
6a488035
TO
26 </primaryKey>
27 <field>
ebc23aab 28 <name>contact_id</name>
57e94608 29 <title>Contact ID</title>
ebc23aab
EM
30 <type>int unsigned</type>
31 <comment>FK to Contact ID</comment>
57e94608
A
32 <html>
33 <label>Contact</label>
34 </html>
ebc23aab 35 <add>2.0</add>
6a488035
TO
36 </field>
37 <foreignKey>
ebc23aab
EM
38 <name>contact_id</name>
39 <table>civicrm_contact</table>
40 <key>id</key>
41 <add>2.0</add>
42 <onDelete>CASCADE</onDelete>
6a488035
TO
43 </foreignKey>
44 <field>
ebc23aab
EM
45 <name>location_type_id</name>
46 <title>Email Location Type</title>
47 <type>int unsigned</type>
48 <comment>Which Location does this email belong to.</comment>
49 <add>2.0</add>
50 <pseudoconstant>
51 <table>civicrm_location_type</table>
52 <keyColumn>id</keyColumn>
53 <labelColumn>display_name</labelColumn>
54 </pseudoconstant>
55 <html>
56 <type>Select</type>
57 </html>
6a488035
TO
58 </field>
59 <index>
60 <name>index_location_type</name>
61 <fieldName>location_type_id</fieldName>
62 <add>2.0</add>
63 </index>
64 <field>
ebc23aab 65 <name>email</name>
53780a9b 66 <title>Email</title>
ebc23aab
EM
67 <type>varchar</type>
68 <length>254</length>
69 <html>
70 <type>Text</type>
54f5e87f 71 <size>30</size>
ebc23aab
EM
72 </html>
73 <import>true</import>
74 <headerPattern>/e.?mail/i</headerPattern>
75 <dataPattern>/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/</dataPattern>
76 <rule>email</rule>
77 <comment>Email address</comment>
78 <add>1.1</add>
6a488035
TO
79 </field>
80 <index>
ebc23aab
EM
81 <name>UI_email</name>
82 <fieldName>email</fieldName>
83 <add>1.5</add>
6a488035
TO
84 </index>
85 <field>
ebc23aab 86 <name>is_primary</name>
b6673dcd 87 <title>Primary email</title>
ebc23aab
EM
88 <type>boolean</type>
89 <default>0</default>
b6673dcd 90 <comment>Is this the primary email address</comment>
ebc23aab 91 <add>1.1</add>
b6673dcd
CW
92 <html>
93 <type>Radio</type>
94 </html>
6a488035
TO
95 </field>
96 <index>
97 <name>index_is_primary</name>
98 <fieldName>is_primary</fieldName>
99 <add>2.0</add>
100 </index>
101 <field>
ebc23aab 102 <name>is_billing</name>
53780a9b 103 <title>Is Billing Email?</title>
ebc23aab
EM
104 <type>boolean</type>
105 <default>0</default>
106 <comment>Is this the billing?</comment>
107 <add>2.0</add>
6a488035
TO
108 </field>
109 <index>
110 <name>index_is_billing</name>
111 <fieldName>is_billing</fieldName>
112 <add>2.0</add>
113 </index>
114 <field>
115 <name>on_hold</name>
f61d1b83 116 <title>On Hold</title>
6a488035 117 <export>true</export>
f61d1b83 118 <type>int unsigned</type>
6a488035
TO
119 <default>0</default>
120 <required>true</required>
f61d1b83
AS
121 <comment>Implicit FK to civicrm_option_value where option_group = email_on_hold.</comment>
122 <pseudoconstant>
123 <callback>CRM_Core_PseudoConstant::emailOnHoldOptions</callback>
124 </pseudoconstant>
6a488035 125 <add>1.1</add>
031f9ac8 126 <html>
f61d1b83 127 <type>Select</type>
031f9ac8 128 </html>
6a488035
TO
129 </field>
130 <field>
131 <name>is_bulkmail</name>
132 <title>Use for Bulk Mail</title>
133 <export>true</export>
134 <type>boolean</type>
135 <default>0</default>
136 <required>true</required>
137 <comment>Is this address for bulk mail ?</comment>
138 <add>1.9</add>
139 </field>
140 <field>
141 <name>hold_date</name>
142 <type>datetime</type>
143 <comment>When the address went on bounce hold</comment>
1662d426
A
144 <html>
145 <label>Hold Date</label>
f01d655f
EM
146 <type>Select Date</type>
147 <formatType>activityDateTime</formatType>
1662d426 148 </html>
6a488035
TO
149 <add>1.1</add>
150 </field>
151 <field>
152 <name>reset_date</name>
153 <type>datetime</type>
154 <comment>When the address bounce status was last reset</comment>
1662d426
A
155 <html>
156 <label>Reset Date</label>
f01d655f
EM
157 <type>Select Date</type>
158 <formatType>activityDateTime</formatType>
1662d426 159 </html>
6a488035
TO
160 <add>1.1</add>
161 </field>
162 <field>
163 <name>signature_text</name>
164 <type>text</type>
165 <import>true</import>
166 <default>NULL</default>
167 <comment>Text formatted signature for the email.</comment>
1662d426
A
168 <html>
169 <label>Signature Text</label>
170 </html>
6a488035
TO
171 <add>3.2</add>
172 </field>
173 <field>
174 <name>signature_html</name>
175 <type>text</type>
176 <import>true</import>
177 <default>NULL</default>
178 <comment>HTML formatted signature for the email.</comment>
1662d426
A
179 <html>
180 <label>Signature HTML</label>
181 </html>
6a488035
TO
182 <add>3.2</add>
183 </field>
184</table>