| 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> |
| 10 | <field> |
| 11 | <name>id</name> |
| 12 | <title>Email ID</title> |
| 13 | <type>int unsigned</type> |
| 14 | <required>true</required> |
| 15 | <comment>Unique Email ID</comment> |
| 16 | <add>1.1</add> |
| 17 | </field> |
| 18 | <primaryKey> |
| 19 | <name>id</name> |
| 20 | <autoincrement>true</autoincrement> |
| 21 | </primaryKey> |
| 22 | <field> |
| 23 | <name>contact_id</name> |
| 24 | <title>Email Contact</title> |
| 25 | <type>int unsigned</type> |
| 26 | <comment>FK to Contact ID</comment> |
| 27 | <add>2.0</add> |
| 28 | </field> |
| 29 | <foreignKey> |
| 30 | <name>contact_id</name> |
| 31 | <table>civicrm_contact</table> |
| 32 | <key>id</key> |
| 33 | <add>2.0</add> |
| 34 | <onDelete>CASCADE</onDelete> |
| 35 | </foreignKey> |
| 36 | <field> |
| 37 | <name>location_type_id</name> |
| 38 | <title>Email Location Type</title> |
| 39 | <type>int unsigned</type> |
| 40 | <comment>Which Location does this email belong to.</comment> |
| 41 | <add>2.0</add> |
| 42 | <pseudoconstant> |
| 43 | <table>civicrm_location_type</table> |
| 44 | <keyColumn>id</keyColumn> |
| 45 | <labelColumn>display_name</labelColumn> |
| 46 | </pseudoconstant> |
| 47 | <html> |
| 48 | <type>Select</type> |
| 49 | </html> |
| 50 | </field> |
| 51 | <index> |
| 52 | <name>index_location_type</name> |
| 53 | <fieldName>location_type_id</fieldName> |
| 54 | <add>2.0</add> |
| 55 | </index> |
| 56 | <field> |
| 57 | <name>email</name> |
| 58 | <title>Email</title> |
| 59 | <type>varchar</type> |
| 60 | <length>254</length> |
| 61 | <html> |
| 62 | <type>Text</type> |
| 63 | <size>30</size> |
| 64 | </html> |
| 65 | <import>true</import> |
| 66 | <headerPattern>/e.?mail/i</headerPattern> |
| 67 | <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> |
| 68 | <rule>email</rule> |
| 69 | <comment>Email address</comment> |
| 70 | <add>1.1</add> |
| 71 | </field> |
| 72 | <index> |
| 73 | <name>UI_email</name> |
| 74 | <fieldName>email</fieldName> |
| 75 | <add>1.5</add> |
| 76 | </index> |
| 77 | <field> |
| 78 | <name>is_primary</name> |
| 79 | <type>boolean</type> |
| 80 | <default>0</default> |
| 81 | <comment>Is this the primary email for this contact and location.</comment> |
| 82 | <add>1.1</add> |
| 83 | </field> |
| 84 | <field> |
| 85 | <name>is_primary</name> |
| 86 | <title>Is Primary email</title> |
| 87 | <type>boolean</type> |
| 88 | <default>0</default> |
| 89 | <comment>Is this the primary?</comment> |
| 90 | <add>2.0</add> |
| 91 | </field> |
| 92 | <index> |
| 93 | <name>index_is_primary</name> |
| 94 | <fieldName>is_primary</fieldName> |
| 95 | <add>2.0</add> |
| 96 | </index> |
| 97 | <field> |
| 98 | <name>is_billing</name> |
| 99 | <title>Is Billing Email?</title> |
| 100 | <type>boolean</type> |
| 101 | <default>0</default> |
| 102 | <comment>Is this the billing?</comment> |
| 103 | <add>2.0</add> |
| 104 | </field> |
| 105 | <index> |
| 106 | <name>index_is_billing</name> |
| 107 | <fieldName>is_billing</fieldName> |
| 108 | <add>2.0</add> |
| 109 | </index> |
| 110 | <field> |
| 111 | <name>on_hold</name> |
| 112 | <export>true</export> |
| 113 | <type>boolean</type> |
| 114 | <default>0</default> |
| 115 | <required>true</required> |
| 116 | <comment>Is this address on bounce hold?</comment> |
| 117 | <add>1.1</add> |
| 118 | <html> |
| 119 | <type>CheckBox</type> |
| 120 | </html> |
| 121 | </field> |
| 122 | <field> |
| 123 | <name>is_bulkmail</name> |
| 124 | <title>Use for Bulk Mail</title> |
| 125 | <export>true</export> |
| 126 | <type>boolean</type> |
| 127 | <default>0</default> |
| 128 | <required>true</required> |
| 129 | <comment>Is this address for bulk mail ?</comment> |
| 130 | <add>1.9</add> |
| 131 | </field> |
| 132 | <field> |
| 133 | <name>hold_date</name> |
| 134 | <type>datetime</type> |
| 135 | <comment>When the address went on bounce hold</comment> |
| 136 | <add>1.1</add> |
| 137 | </field> |
| 138 | <field> |
| 139 | <name>reset_date</name> |
| 140 | <type>datetime</type> |
| 141 | <comment>When the address bounce status was last reset</comment> |
| 142 | <add>1.1</add> |
| 143 | </field> |
| 144 | <field> |
| 145 | <name>signature_text</name> |
| 146 | <type>text</type> |
| 147 | <import>true</import> |
| 148 | <default>NULL</default> |
| 149 | <comment>Text formatted signature for the email.</comment> |
| 150 | <add>3.2</add> |
| 151 | </field> |
| 152 | <field> |
| 153 | <name>signature_html</name> |
| 154 | <type>text</type> |
| 155 | <import>true</import> |
| 156 | <default>NULL</default> |
| 157 | <comment>HTML formatted signature for the email.</comment> |
| 158 | <add>3.2</add> |
| 159 | </field> |
| 160 | </table> |