Merge pull request #18794 from eileenmcnaughton/need_less
[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 <title>State/Province</title>
9 <titlePlural>States/Provinces</titlePlural>
10 <field>
11 <name>id</name>
12 <title>State ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>State/Province ID</comment>
16 <add>1.1</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>false</autoincrement>
21 </primaryKey>
22 <field>
23 <name>name</name>
24 <title>State</title>
25 <type>varchar</type>
26 <length>64</length>
27 <import>true</import>
28 <headerPattern>/state|prov(ince)?/i</headerPattern>
29 <dataPattern>/[A-Z]{2}/</dataPattern>
30 <comment>Name of State/Province</comment>
31 <add>1.1</add>
32 </field>
33 <field>
34 <name>abbreviation</name>
35 <title>State Abbreviation</title>
36 <type>varchar</type>
37 <length>4</length>
38 <comment>2-4 Character Abbreviation of State/Province</comment>
39 <add>1.1</add>
40 </field>
41 <field>
42 <name>country_id</name>
43 <title>Country</title>
44 <type>int unsigned</type>
45 <required>true</required>
46 <comment>ID of Country that State/Province belong</comment>
47 <add>1.1</add>
48 </field>
49 <foreignKey>
50 <name>country_id</name>
51 <table>civicrm_country</table>
52 <key>id</key>
53 <add>1.1</add>
54 </foreignKey>
55 <index>
56 <name>UI_name_country_id</name>
57 <fieldName>name</fieldName>
58 <fieldName>country_id</fieldName>
59 <unique>true</unique>
60 <add>1.1</add>
61 </index>
62 </table>