Merge pull request #17864 from colemanw/searchFix
[civicrm-core.git] / xml / schema / Core / StateProvince.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>StateProvince</class>
6 <name>civicrm_state_province</name>
7 <add>1.1</add>
8 <field>
9 <name>id</name>
10 <title>State ID</title>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>State/Province 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>State</title>
23 <type>varchar</type>
24 <length>64</length>
25 <import>true</import>
26 <headerPattern>/state|prov(ince)?/i</headerPattern>
27 <dataPattern>/[A-Z]{2}/</dataPattern>
28 <comment>Name of State/Province</comment>
29 <add>1.1</add>
30 </field>
31 <field>
32 <name>abbreviation</name>
33 <title>State Abbreviation</title>
34 <type>varchar</type>
35 <length>4</length>
36 <comment>2-4 Character Abbreviation of State/Province</comment>
37 <add>1.1</add>
38 </field>
39 <field>
40 <name>country_id</name>
41 <title>Country</title>
42 <type>int unsigned</type>
43 <required>true</required>
44 <comment>ID of Country that State/Province belong</comment>
45 <add>1.1</add>
46 </field>
47 <foreignKey>
48 <name>country_id</name>
49 <table>civicrm_country</table>
50 <key>id</key>
51 <add>1.1</add>
52 </foreignKey>
53 <index>
54 <name>UI_name_country_id</name>
55 <fieldName>name</fieldName>
56 <fieldName>country_id</fieldName>
57 <unique>true</unique>
58 <add>1.1</add>
59 </index>
60 </table>