Merge pull request #16786 from civicrm/5.24
[civicrm-core.git] / xml / schema / Core / County.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>County</class>
6 <name>civicrm_county</name>
7 <add>1.1</add>
8 <field>
9 <name>id</name>
10 <title>County ID</title>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>County ID</comment>
14 <add>1.1</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>false</autoincrement>
19 </primaryKey>
20 <field>
21 <name>name</name>
22 <title>County</title>
23 <type>varchar</type>
24 <length>64</length>
25 <import>true</import>
26 <headerPattern>/county/i</headerPattern>
27 <dataPattern>/[A-Z]{2}/</dataPattern>
28 <comment>Name of County</comment>
29 <add>1.1</add>
30 </field>
31 <field>
32 <name>abbreviation</name>
33 <title>County Abbreviation</title>
34 <type>varchar</type>
35 <length>4</length>
36 <comment>2-4 Character Abbreviation of County</comment>
37 <add>1.1</add>
38 </field>
39 <field>
40 <name>state_province_id</name>
41 <title>State</title>
42 <type>int unsigned</type>
43 <required>true</required>
44 <comment>ID of State/Province that County belongs</comment>
45 <add>1.1</add>
46 </field>
47 <foreignKey>
48 <name>state_province_id</name>
49 <table>civicrm_state_province</table>
50 <key>id</key>
51 <add>1.1</add>
52 </foreignKey>
53 <index>
54 <name>UI_name_state_id</name>
55 <fieldName>name</fieldName>
56 <fieldName>state_province_id</fieldName>
57 <unique>true</unique>
58 <add>1.1</add>
59 </index>
60 </table>