Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contact</base> | |
5 | <class>Organization</class> | |
6 | <name>civicrm_organization</name> | |
7 | <comment>Define organization specific properties</comment> | |
8 | <add>1.1</add> | |
9 | <log>true</log> | |
10 | <field> | |
8f069c03 EM |
11 | <name>id</name> |
12 | <type>int unsigned</type> | |
13 | <required>true</required> | |
14 | <comment>Unique Organization ID</comment> | |
15 | <add>1.1</add> | |
6a488035 TO |
16 | </field> |
17 | <primaryKey> | |
8f069c03 EM |
18 | <name>id</name> |
19 | <autoincrement>true</autoincrement> | |
6a488035 TO |
20 | </primaryKey> |
21 | <field> | |
8f069c03 EM |
22 | <name>contact_id</name> |
23 | <type>int unsigned</type> | |
24 | <required>true</required> | |
25 | <comment>FK to Contact ID</comment> | |
26 | <add>1.1</add> | |
6a488035 TO |
27 | </field> |
28 | <foreignKey> | |
8f069c03 EM |
29 | <name>contact_id</name> |
30 | <table>civicrm_contact</table> | |
31 | <key>id</key> | |
32 | <add>1.1</add> | |
6a488035 TO |
33 | </foreignKey> |
34 | <field> | |
8f069c03 EM |
35 | <name>organization_name</name> |
36 | <type>varchar</type> | |
37 | <length>128</length> | |
38 | <import>true</import> | |
39 | <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern> | |
40 | <dataPattern>/^\w+$/</dataPattern> | |
41 | <comment>Organization Name.</comment> | |
42 | <fulltext/> | |
43 | <add>1.1</add> | |
6a488035 TO |
44 | </field> |
45 | <index> | |
8f069c03 EM |
46 | <name>index_organization_name</name> |
47 | <fieldName>organization_name</fieldName> | |
48 | <add>1.8</add> | |
6a488035 TO |
49 | </index> |
50 | <field> | |
8f069c03 EM |
51 | <name>legal_name</name> |
52 | <type>varchar</type> | |
53 | <length>128</length> | |
54 | <import>true</import> | |
55 | <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern> | |
56 | <comment>Legal Name.</comment> | |
57 | <fulltext/> | |
58 | <add>1.1</add> | |
6a488035 TO |
59 | </field> |
60 | <field> | |
8f069c03 EM |
61 | <name>sic_code</name> |
62 | <type>varchar</type> | |
63 | <length>8</length> | |
64 | <import>true</import> | |
65 | <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern> | |
66 | <comment>Standard Industry Classification Code.</comment> | |
67 | <add>1.1</add> | |
6a488035 TO |
68 | </field> |
69 | <field> | |
8f069c03 EM |
70 | <name>primary_contact_id</name> |
71 | <type>int unsigned</type> | |
72 | <comment>Optional FK to Primary Contact for this organization.</comment> | |
73 | <add>1.1</add> | |
6a488035 TO |
74 | </field> |
75 | <foreignKey> | |
8f069c03 EM |
76 | <name>primary_contact_id</name> |
77 | <table>civicrm_contact</table> | |
78 | <key>id</key> | |
79 | <add>1.1</add> | |
6a488035 TO |
80 | </foreignKey> |
81 | <index> | |
82 | <name>UI_contact</name> | |
83 | <fieldName>contact_id</fieldName> | |
84 | <unique>true</unique> | |
85 | <add>1.6</add> | |
86 | </index> | |
87 | </table> |