Merge pull request #23568 from civicrm/5.50
[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 <labelField>name</labelField>
11 <field>
12 <name>id</name>
13 <title>State ID</title>
14 <type>int unsigned</type>
15 <required>true</required>
16 <comment>State/Province ID</comment>
17 <html>
18 <type>Number</type>
19 </html>
20 <add>1.1</add>
21 </field>
22 <primaryKey>
23 <name>id</name>
24 <autoincrement>false</autoincrement>
25 </primaryKey>
26 <field>
27 <name>name</name>
28 <title>State</title>
29 <type>varchar</type>
30 <length>64</length>
31 <import>true</import>
32 <headerPattern>/state|prov(ince)?/i</headerPattern>
33 <dataPattern>/[A-Z]{2}/</dataPattern>
34 <comment>Name of State/Province</comment>
35 <add>1.1</add>
36 </field>
37 <field>
38 <name>abbreviation</name>
39 <title>State Abbreviation</title>
40 <type>varchar</type>
41 <length>4</length>
42 <comment>2-4 Character Abbreviation of State/Province</comment>
43 <add>1.1</add>
44 </field>
45 <field>
46 <name>country_id</name>
47 <title>Country ID</title>
48 <type>int unsigned</type>
49 <required>true</required>
50 <comment>ID of Country that State/Province belong</comment>
51 <html>
52 <label>Country</label>
53 </html>
54 <add>1.1</add>
55 </field>
56 <foreignKey>
57 <name>country_id</name>
58 <table>civicrm_country</table>
59 <key>id</key>
60 <add>1.1</add>
61 </foreignKey>
62 <field>
63 <name>is_active</name>
64 <title>StateProvince Is Active</title>
65 <type>boolean</type>
66 <default>1</default>
67 <required>true</required>
68 <comment>Is this StateProvince active?</comment>
69 <add>5.35</add>
70 </field>
71 <index>
72 <name>UI_name_country_id</name>
73 <fieldName>name</fieldName>
74 <fieldName>country_id</fieldName>
75 <unique>true</unique>
76 <add>1.1</add>
77 </index>
78 </table>