| 1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
| 2 | |
| 3 | <table> |
| 4 | <base>CRM/Contact</base> |
| 5 | <class>RelationshipType</class> |
| 6 | <name>civicrm_relationship_type</name> |
| 7 | <comment>Relationship types s/b structured with contact_a as the 'subject/child' contact and contact_b as the 'object/parent' contact (e.g. Individual A is Employee of Org B).</comment> |
| 8 | <add>1.1</add> |
| 9 | <log>true</log> |
| 10 | <field> |
| 11 | <name>id</name> |
| 12 | <type>int unsigned</type> |
| 13 | <title>Relationship Type ID</title> |
| 14 | <required>true</required> |
| 15 | <comment>Primary key</comment> |
| 16 | <html> |
| 17 | <type>Number</type> |
| 18 | </html> |
| 19 | <add>1.1</add> |
| 20 | </field> |
| 21 | <primaryKey> |
| 22 | <name>id</name> |
| 23 | <autoincrement>true</autoincrement> |
| 24 | </primaryKey> |
| 25 | <field> |
| 26 | <name>name_a_b</name> |
| 27 | <type>varchar</type> |
| 28 | <title>Relationship Type Name A to B</title> |
| 29 | <length>64</length> |
| 30 | <comment>name for relationship of contact_a to contact_b.</comment> |
| 31 | <add>1.1</add> |
| 32 | </field> |
| 33 | <field> |
| 34 | <name>label_a_b</name> |
| 35 | <type>varchar</type> |
| 36 | <title>Relationship Type Label A to B</title> |
| 37 | <length>64</length> |
| 38 | <comment>label for relationship of contact_a to contact_b.</comment> |
| 39 | <html> |
| 40 | <type>Text</type> |
| 41 | </html> |
| 42 | <add>3.0</add> |
| 43 | <localizable>true</localizable> |
| 44 | </field> |
| 45 | <field> |
| 46 | <name>name_b_a</name> |
| 47 | <type>varchar</type> |
| 48 | <title>Relationship Type Name B to A</title> |
| 49 | <length>64</length> |
| 50 | <comment>Optional name for relationship of contact_b to contact_a.</comment> |
| 51 | <add>1.1</add> |
| 52 | </field> |
| 53 | <field> |
| 54 | <name>label_b_a</name> |
| 55 | <type>varchar</type> |
| 56 | <title>Relationship Type Label B to A</title> |
| 57 | <length>64</length> |
| 58 | <comment>Optional label for relationship of contact_b to contact_a.</comment> |
| 59 | <html> |
| 60 | <type>Text</type> |
| 61 | </html> |
| 62 | <add>3.0</add> |
| 63 | <localizable>true</localizable> |
| 64 | </field> |
| 65 | <field> |
| 66 | <name>description</name> |
| 67 | <type>varchar</type> |
| 68 | <title>Relationship Description</title> |
| 69 | <length>255</length> |
| 70 | <comment>Optional verbose description of the relationship type.</comment> |
| 71 | <add>1.1</add> |
| 72 | <html> |
| 73 | <type>Text</type> |
| 74 | </html> |
| 75 | <localizable>true</localizable> |
| 76 | </field> |
| 77 | <field> |
| 78 | <name>contact_type_a</name> |
| 79 | <title>Contact Type for Contact A</title> |
| 80 | <type>varchar</type> |
| 81 | <length>12</length> |
| 82 | <comment>If defined, contact_a in a relationship of this type must be a specific contact_type.</comment> |
| 83 | <pseudoconstant> |
| 84 | <table>civicrm_contact_type</table> |
| 85 | <keyColumn>name</keyColumn> |
| 86 | <labelColumn>label</labelColumn> |
| 87 | <condition>parent_id IS NULL</condition> |
| 88 | </pseudoconstant> |
| 89 | <add>1.1</add> |
| 90 | <html> |
| 91 | <type>Select</type> |
| 92 | </html> |
| 93 | </field> |
| 94 | <field> |
| 95 | <name>contact_type_b</name> |
| 96 | <title>Contact Type for Contact B</title> |
| 97 | <type>varchar</type> |
| 98 | <length>12</length> |
| 99 | <comment>If defined, contact_b in a relationship of this type must be a specific contact_type.</comment> |
| 100 | <pseudoconstant> |
| 101 | <table>civicrm_contact_type</table> |
| 102 | <keyColumn>name</keyColumn> |
| 103 | <labelColumn>label</labelColumn> |
| 104 | <condition>parent_id IS NULL</condition> |
| 105 | </pseudoconstant> |
| 106 | <add>1.1</add> |
| 107 | <html> |
| 108 | <type>Select</type> |
| 109 | </html> |
| 110 | </field> |
| 111 | <field> |
| 112 | <name>contact_sub_type_a</name> |
| 113 | <title>Contact Subtype A</title> |
| 114 | <type>varchar</type> |
| 115 | <length>64</length> |
| 116 | <comment>If defined, contact_sub_type_a in a relationship of this type must be a specific contact_sub_type.</comment> |
| 117 | <add>3.1</add> |
| 118 | <html> |
| 119 | <type>Select</type> |
| 120 | </html> |
| 121 | <pseudoconstant> |
| 122 | <table>civicrm_contact_type</table> |
| 123 | <keyColumn>name</keyColumn> |
| 124 | <labelColumn>label</labelColumn> |
| 125 | <condition>parent_id IS NOT NULL</condition> |
| 126 | </pseudoconstant> |
| 127 | </field> |
| 128 | <field> |
| 129 | <name>contact_sub_type_b</name> |
| 130 | <title>Contact Subtype B</title> |
| 131 | <type>varchar</type> |
| 132 | <length>64</length> |
| 133 | <comment>If defined, contact_sub_type_b in a relationship of this type must be a specific contact_sub_type.</comment> |
| 134 | <add>3.1</add> |
| 135 | <html> |
| 136 | <type>Select</type> |
| 137 | </html> |
| 138 | <pseudoconstant> |
| 139 | <table>civicrm_contact_type</table> |
| 140 | <keyColumn>name</keyColumn> |
| 141 | <labelColumn>label</labelColumn> |
| 142 | <condition>parent_id IS NOT NULL</condition> |
| 143 | </pseudoconstant> |
| 144 | </field> |
| 145 | <field> |
| 146 | <name>is_reserved</name> |
| 147 | <type>boolean</type> |
| 148 | <title>Relationship Type is Reserved</title> |
| 149 | <comment>Is this relationship type a predefined system type (can not be changed or de-activated)?</comment> |
| 150 | <html> |
| 151 | <type>CheckBox</type> |
| 152 | </html> |
| 153 | <add>1.1</add> |
| 154 | </field> |
| 155 | <field> |
| 156 | <name>is_active</name> |
| 157 | <title>Relationship Type is Active</title> |
| 158 | <type>boolean</type> |
| 159 | <default>1</default> |
| 160 | <comment>Is this relationship type currently active (i.e. can be used when creating or editing relationships)?</comment> |
| 161 | <html> |
| 162 | <type>CheckBox</type> |
| 163 | </html> |
| 164 | <add>1.1</add> |
| 165 | </field> |
| 166 | <index> |
| 167 | <name>UI_name_a_b</name> |
| 168 | <fieldName>name_a_b</fieldName> |
| 169 | <unique>true</unique> |
| 170 | <add>2.1</add> |
| 171 | </index> |
| 172 | <index> |
| 173 | <name>UI_name_b_a</name> |
| 174 | <fieldName>name_b_a</fieldName> |
| 175 | <unique>true</unique> |
| 176 | <add>2.1</add> |
| 177 | </index> |
| 178 | </table> |