Merge pull request #23210 from eileenmcnaughton/cancel
[civicrm-core.git] / xml / schema / Core / Country.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Country</class>
6 <name>civicrm_country</name>
7 <add>1.1</add>
8 <labelField>name</labelField>
9 <field>
10 <name>id</name>
11 <title>Country ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Country ID</comment>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.1</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>name</name>
26 <title>Country</title>
27 <type>varchar</type>
28 <length>64</length>
29 <import>true</import>
30 <headerPattern>/country/i</headerPattern>
31 <dataPattern>/^[A-Z][a-z]+\.?(\s+[A-Z][a-z]+){0,3}$/</dataPattern>
32 <comment>Country Name</comment>
33 <add>1.1</add>
34 </field>
35 <field>
36 <name>iso_code</name>
37 <title>Country ISO Code</title>
38 <type>char</type>
39 <length>2</length>
40 <comment>ISO Code</comment>
41 <add>1.1</add>
42 </field>
43 <field>
44 <name>country_code</name>
45 <title>Country Phone Prefix</title>
46 <type>varchar</type>
47 <length>4</length>
48 <comment>National prefix to be used when dialing TO this country.</comment>
49 <add>1.1</add>
50 </field>
51 <field>
52 <name>address_format_id</name>
53 <title>Address Format ID</title>
54 <type>int unsigned</type>
55 <comment>Foreign key to civicrm_address_format.id.</comment>
56 <html>
57 <label>Address Format</label>
58 </html>
59 <add>3.2</add>
60 </field>
61 <foreignKey>
62 <name>address_format_id</name>
63 <table>civicrm_address_format</table>
64 <key>id</key>
65 <add>3.2</add>
66 </foreignKey>
67 <field>
68 <name>idd_prefix</name>
69 <title>Outgoing Phone Prefix</title>
70 <type>varchar</type>
71 <length>4</length>
72 <comment>International direct dialing prefix from within the country TO another country</comment>
73 <add>1.1</add>
74 </field>
75 <field>
76 <name>ndd_prefix</name>
77 <title>Area Code</title>
78 <type>varchar</type>
79 <length>4</length>
80 <comment>Access prefix to call within a country to a different area</comment>
81 <add>1.1</add>
82 </field>
83 <field>
84 <name>region_id</name>
85 <title>World Region ID</title>
86 <type>int unsigned</type>
87 <required>true</required>
88 <comment>Foreign key to civicrm_worldregion.id.</comment>
89 <html>
90 <label>World Region</label>
91 </html>
92 <add>1.8</add>
93 <localize_context>country</localize_context>
94 <pseudoconstant>
95 <table>civicrm_worldregion</table>
96 <keyColumn>id</keyColumn>
97 <labelColumn>name</labelColumn>
98 </pseudoconstant>
99 </field>
100 <foreignKey>
101 <name>region_id</name>
102 <table>civicrm_worldregion</table>
103 <key>id</key>
104 <add>1.8</add>
105 </foreignKey>
106 <field>
107 <name>is_province_abbreviated</name>
108 <title>Abbreviate Province?</title>
109 <type>boolean</type>
110 <default>0</default>
111 <required>true</required>
112 <comment>Should state/province be displayed as abbreviation for contacts from this country?</comment>
113 <add>3.1</add>
114 </field>
115 <field>
116 <name>is_active</name>
117 <title>Country Is Active</title>
118 <type>boolean</type>
119 <default>1</default>
120 <required>true</required>
121 <comment>Is this Country active?</comment>
122 <add>5.35</add>
123 </field>
124 <index>
125 <name>UI_name_iso_code</name>
126 <fieldName>name</fieldName>
127 <fieldName>iso_code</fieldName>
128 <unique>true</unique>
129 <add>1.1</add>
130 </index>
131 </table>