Merge pull request #22571 from eileenmcnaughton/trxn
[civicrm-core.git] / xml / schema / Core / County.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Core</base>
5 <class>County</class>
6 <name>civicrm_county</name>
7 <add>1.1</add>
8ab43c93 8 <labelField>name</labelField>
6a488035 9 <field>
186e0984 10 <name>id</name>
fa6ace1a 11 <title>County ID</title>
186e0984
EM
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>County ID</comment>
0481e12c
A
15 <html>
16 <type>Number</type>
17 </html>
186e0984 18 <add>1.1</add>
6a488035
TO
19 </field>
20 <primaryKey>
186e0984
EM
21 <name>id</name>
22 <autoincrement>false</autoincrement>
6a488035
TO
23 </primaryKey>
24 <field>
186e0984
EM
25 <name>name</name>
26 <title>County</title>
27 <type>varchar</type>
28 <length>64</length>
29 <import>true</import>
30 <headerPattern>/county/i</headerPattern>
31 <dataPattern>/[A-Z]{2}/</dataPattern>
32 <comment>Name of County</comment>
33 <add>1.1</add>
6a488035
TO
34 </field>
35 <field>
186e0984
EM
36 <name>abbreviation</name>
37 <title>County Abbreviation</title>
38 <type>varchar</type>
39 <length>4</length>
40 <comment>2-4 Character Abbreviation of County</comment>
41 <add>1.1</add>
6a488035
TO
42 </field>
43 <field>
186e0984 44 <name>state_province_id</name>
57e94608 45 <title>State ID</title>
186e0984
EM
46 <type>int unsigned</type>
47 <required>true</required>
757069de 48 <comment>ID of State/Province that County belongs</comment>
57e94608
A
49 <html>
50 <label>State</label>
57e94608 51 </html>
186e0984 52 <add>1.1</add>
96012881
PN
53 <pseudoconstant>
54 <table>civicrm_state_province</table>
55 <keyColumn>id</keyColumn>
56 <labelColumn>name</labelColumn>
70c5cd97 57 <abbrColumn>abbreviation</abbrColumn>
96012881 58 </pseudoconstant>
6a488035
TO
59 </field>
60 <foreignKey>
186e0984
EM
61 <name>state_province_id</name>
62 <table>civicrm_state_province</table>
63 <key>id</key>
64 <add>1.1</add>
6a488035 65 </foreignKey>
005f02ec
MW
66 <field>
67 <name>is_active</name>
68 <title>County Is Active</title>
69 <type>boolean</type>
70 <default>1</default>
c1e814c7 71 <required>true</required>
005f02ec
MW
72 <comment>Is this County active?</comment>
73 <add>5.35</add>
74 </field>
6a488035
TO
75 <index>
76 <name>UI_name_state_id</name>
77 <fieldName>name</fieldName>
78 <fieldName>state_province_id</fieldName>
79 <unique>true</unique>
80 <add>1.1</add>
81 </index>
82</table>