Ian province abbreviation patch - issue 724
[civicrm-core.git] / xml / schema / Core / StateProvince.xml
CommitLineData
6a488035
TO
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>
8f069c03
EM
9 <name>id</name>
10 <type>int unsigned</type>
11 <required>true</required>
757069de 12 <comment>State/Province ID</comment>
8f069c03 13 <add>1.1</add>
6a488035
TO
14 </field>
15 <primaryKey>
8f069c03
EM
16 <name>id</name>
17 <autoincrement>false</autoincrement>
6a488035
TO
18 </primaryKey>
19 <field>
8f069c03
EM
20 <name>name</name>
21 <title>State</title>
22 <type>varchar</type>
23 <length>64</length>
24 <import>true</import>
25 <headerPattern>/state|prov(ince)?/i</headerPattern>
26 <dataPattern>/[A-Z]{2}/</dataPattern>
757069de 27 <comment>Name of State/Province</comment>
8f069c03 28 <add>1.1</add>
6a488035
TO
29 </field>
30 <field>
8f069c03
EM
31 <name>abbreviation</name>
32 <title>State Abbreviation</title>
33 <type>varchar</type>
34 <length>4</length>
757069de 35 <comment>2-4 Character Abbreviation of State/Province</comment>
8f069c03 36 <add>1.1</add>
6a488035
TO
37 </field>
38 <field>
8f069c03
EM
39 <name>country_id</name>
40 <type>int unsigned</type>
41 <required>true</required>
757069de 42 <comment>ID of Country that State/Province belong</comment>
8f069c03 43 <add>1.1</add>
6a488035
TO
44 </field>
45 <foreignKey>
8f069c03
EM
46 <name>country_id</name>
47 <table>civicrm_country</table>
48 <key>id</key>
49 <add>1.1</add>
6a488035
TO
50 </foreignKey>
51 <index>
52 <name>UI_name_country_id</name>
53 <fieldName>name</fieldName>
54 <fieldName>country_id</fieldName>
55 <unique>true</unique>
56 <add>1.1</add>
57 </index>
58</table>