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