"function"); $sql_updates = array( 'CivicSpace 0.1 to 0.2' => 'civic_update_1', 'CivicSpace 0.2 to 0.3' => 'civic_update_2', // no db updates for 0.3 to 0.4 'CivicSpace 0.4 to 0.5' => 'civic_update_4', 'CivicSpace 0.5 to 0.6' => 'civic_update_5', 'CivicSpace 0.6 to 0.7' => 'civic_update_6', 'CivicSpace 0.7 to 0.7.1' => 'civic_update_7', 'CivicSpace 0.7.1 to 0.8.0' => 'civic_update_8', // no db updates for 0.8.0 to 0.8.0.1 'CivicSpace 0.8.0.1 to 0.8.0.2' => 'civic_update_9', 'CivicSpace 0.8.0.2 to 0.8.0.3' => 'civic_update_10', // no db updates for 0.8.0.3 to 0.8.0.4 // no db updates for 0.8.0.4 to 0.8.0.5 'CivicSpace 0.8.0.5 to 0.8.1' => 'civic_update_11', 'CivicSpace 0.8.1 to 0.8.1.1' => 'civic_update_12', 'CivicSpace 0.8.1.1 to 0.8.1.2' => 'civic_update_13', // no db updates for 0.8.1.2 to 0.8.1.3 'CivicSpace 0.8.1.3 to 0.8.2' => 'civic_update_14', 'CivicSpace 0.8.2 to 0.8.3' => 'civic_update_15', 'CivicSpace 0.8.3 to 0.8.4' => 'civic_update_16' ); function civic_update_1() { $ret = array(); $ret[] = update_sql("ALTER TABLE {contact} DROP first_name"); $ret[] = update_sql("ALTER TABLE {contact} DROP first_name_csid"); $ret[] = update_sql("ALTER TABLE {contact} DROP last_name"); $ret[] = update_sql("ALTER TABLE {contact} DROP last_name_csid"); $ret[] = update_sql("ALTER TABLE {contact} DROP city"); $ret[] = update_sql("ALTER TABLE {contact} DROP city_csid"); $ret[] = update_sql("ALTER TABLE {contact} DROP state"); $ret[] = update_sql("ALTER TABLE {contact} DROP state_csid"); $ret[] = update_sql("ALTER TABLE {contact} DROP zip"); $ret[] = update_sql("ALTER TABLE {contact} DROP zip_csid"); $ret[] = update_sql("ALTER TABLE {form_fields} ADD multiple tinyint(1) NOT NULL default '0'"); $ret[] = update_sql("CREATE TABLE {mailhandler} ( mid int(10) unsigned NOT NULL auto_increment, mail varchar(255) NOT NULL default '', domain varchar(255) NOT NULL default '', port int(5) unsigned NOT NULL default '0', name varchar(255) NOT NULL default '', pass varchar(255) NOT NULL default '', security tinyint(3) unsigned NOT NULL default '0', mime varchar(128) default NULL, replies tinyint(3) unsigned NOT NULL default '1', fromheader varchar(128) default NULL, commands text, sigseparator varchar(128) default NULL, enabled tinyint(4) default NULL, folder varchar(255) NOT NULL default '', imap tinyint(3) unsigned NOT NULL default '0', mailto varchar(255) NOT NULL default '', PRIMARY KEY (mid), KEY mail (mail) )"); $ret[] = update_sql("CREATE TABLE {menu} ( mid int(10) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL default '', description text, weight tinyint(4) NOT NULL default '0', roles varchar(255) default '', vocabularies varchar(255) default '', PRIMARY KEY (mid), KEY name (name) )"); $ret[] = update_sql("CREATE TABLE {menu_hierarchy} ( iid int(10) unsigned NOT NULL default '0', parent int(10) unsigned NOT NULL default '0', KEY iid (iid), KEY parent (parent) )"); $ret[] = update_sql("CREATE TABLE {menu_item} ( iid int(10) unsigned NOT NULL auto_increment, mid int(10) unsigned NOT NULL default '0', name varchar(255) NOT NULL default '', description text, url varchar(255) NOT NULL default '', weight tinyint(4) NOT NULL default '0', enable int(1) unsigned NOT NULL default '0', roles varchar(255) default '', terms varchar(255) default '', PRIMARY KEY (iid), KEY mid (mid) )"); $ret[] = update_sql("CREATE TABLE {notify} ( uid int(10) unsigned NOT NULL default '0', status tinyint(2) NOT NULL default '0', node tinyint(2) NOT NULL default '0', comment tinyint(2) NOT NULL default '0', attempts tinyint(4) NOT NULL default '0', teasers tinyint(4) NOT NULL default '0', PRIMARY KEY (uid) )"); $ret[] = update_sql("ALTER TABLE {users} DROP contact_first_name"); $ret[] = update_sql("ALTER TABLE {users} DROP contact_last_name"); $ret[] = update_sql("ALTER TABLE {users} DROP contact_city"); $ret[] = update_sql("ALTER TABLE {users} DROP contact_state"); $ret[] = update_sql("ALTER TABLE {users} DROP contact_zip"); return $ret; } function civic_update_2() { $ret = array(); $ret[] = update_sql("ALTER TABLE {event} ADD {galleries} VARCHAR(100);"); $ret[] = update_sql("CREATE TABLE {image} ( nid int(10) unsigned NOT NULL default '0', image_path varchar(255) NOT NULL default '', thumb_path varchar(255) NOT NULL default '', preview_path varchar(255) NOT NULL default '', format varchar(255) NOT NULL default '', width int(10) unsigned NOT NULL default '0', height int(10) unsigned NOT NULL default '0', filesize int(10) unsigned NOT NULL default '0', iptc text, exif text, personal tinyint(4) NOT NULL default '0', weight tinyint(4) NOT NULL default '0', KEY nid (nid) )"); return $ret; } function civic_update_4() { $ret = array(); // listhandler update $ret[] = update_sql('ALTER TABLE {listhandler} CHANGE msgid msgid varchar(255) NOT NULL'); // new buddylist module $ret[] = update_sql('CREATE TABLE {buddylist} ( uid int(10) UNSIGNED NOT NULL, buddy int(10) UNSIGNED NOT NULL, timestamp int(11) NOT NULL, PRIMARY KEY (uid, buddy) )'); $ret[] = update_sql('ALTER TABLE {buddylist} ADD received tinyint(1) NOT NULL'); // event update $ret[] = update_sql('CREATE TABLE {event_field_data} ( name varchar(128) NOT NULL default \'0\', nid int(10) NOT NULL default \'0\', data text NOT NULL, PRIMARY KEY (name, nid) )'); $ret[] = update_sql('ALTER TABLE {event} CHANGE galleries galleries varchar(255) NOT NULL default \'0\''); $ret[] = update_sql('ALTER TABLE {event} DROP data'); $fields = db_query('SELECT name FROM {form_fields} WHERE fid = %d', variable_get('event_forms_fid', 0)); while ($field = db_fetch_object($fields)) { $result = db_query('SELECT nid, '. $field->name .' AS data FROM {event}'); while ($row = db_fetch_object($result)) { db_query('INSERT INTO {event_field_data} (name, nid, data) VALUES (\'%s\', %d, \'%s\') ', $field->name, $row->nid, $row->data); } $ret[] = update_sql('ALTER TABLE {event} DROP '. $field->name); } $ret[] = update_sql('ALTER TABLE {event} ADD INDEX (start)'); // aggregator updates $ret[] = update_sql('ALTER TABLE {bundle} RENAME TO {aggregator_category}'); $ret[] = update_sql('ALTER TABLE {aggregator_category} DROP attributes'); $ret[] = update_sql('ALTER TABLE {aggregator_category} CHANGE bid cid int(10) NOT NULL auto_increment'); $ret[] = update_sql('ALTER TABLE {aggregator_category} ADD description longtext NOT NULL'); $ret[] = update_sql('UPDATE {sequences} SET name = \'{aggregator_category}_cid\' WHERE name = \'{bundle}_bid\''); $ret[] = update_sql('ALTER TABLE {feed} RENAME TO {aggregator_feed}'); $ret[] = update_sql('ALTER TABLE {aggregator_feed} DROP attributes'); $ret[] = update_sql('ALTER TABLE {aggregator_feed} ADD block tinyint(2) NOT NULL'); $ret[] = update_sql('ALTER TABLE {aggregator_category} ADD block tinyint(2) NOT NULL'); $ret[] = update_sql('UPDATE {sequences} SET name = \'{aggregator_feed}_fid\' WHERE name = \'{feed}_fid\''); $ret[] = update_sql('ALTER TABLE {item} RENAME TO {aggregator_item}'); $ret[] = update_sql('ALTER TABLE {aggregator_item} DROP attributes'); /* replaced by a more working update $max = db_result(db_query_range('SELECT iid FROM {aggregator_item} ORDER BY iid DESC', 1, 1)); if ($max) { $ret[] = update_sql('INSERT INTO {sequences} (name, id) VALUES (\'{aggregator_item}_iid\', $max)'); } */ $ret[] = update_sql('CREATE TABLE {aggregator_category_feed} ( fid int(10) NOT NULL, cid int(10) NOT NULL, PRIMARY KEY (fid, cid) )'); $ret[] = update_sql('CREATE TABLE {aggregator_category_item} ( iid int(10) NOT NULL, cid int(10) NOT NULL, PRIMARY KEY (iid, cid) )'); // survey module $ret[] = update_sql('CREATE TABLE {survey} ( nid int(11) unsigned not null, fid int(11) not null, email text, result_page text, primary key(nid) )'); $ret[] = update_sql('CREATE TABLE {survey_responses} ( rid int(11) unsigned not null, nid int(11) unsigned not null, uid int(11) unsigned not null, created int(11) not null, primary key (rid) )'); $ret[] = update_sql('CREATE TABLE {survey_fields} ( rid int(11) unsigned not null, ffid int(11) not null, value text, primary key (rid, ffid) )'); // rsvp module $ret[] = update_sql('CREATE TABLE {rsvp} ( rid int(10) unsigned NOT NULL auto_increment, nid int(10) unsigned NOT NULL default \'0\', uid int(10) unsigned NOT NULL default \'0\', name varchar(128) default \'\', invite_text text, blind int(3) unsigned NOT NULL default \'0\', list_email int(3) unsigned NOT NULL default \'0\', allow_invite int(3) unsigned NOT NULL default \'0\', timestamp int(10) unsigned NOT NULL default \'0\', PRIMARY KEY (rid,uid,nid) )'); $ret[] = update_sql('CREATE TABLE {rsvp_event} ( type enum(\'reminder\',\'update\') default NULL, rid int(10) unsigned NOT NULL default \'0\', content text, trigger_date int(10) unsigned NOT NULL default \'0\', PRIMARY KEY (rid) )'); $ret[] = update_sql('CREATE TABLE {rsvp_to_user} ( response enum(\'yes\',\'no\',\'maybe\',\'none\') NOT NULL default \'none\', rid int(10) unsigned NOT NULL default \'0\', uid int(10) NOT NULL default \'0\', email varchar(128) NOT NULL default \'\', hash varchar(255) NOT NULL default \'\', invited int(10) unsigned NOT NULL default \'0\', received int(10) unsigned NOT NULL default \'0\', timestamp int(10) unsigned NOT NULL default \'0\', PRIMARY KEY (rid,email,uid) )'); $ret[] = update_sql('CREATE TABLE {rsvp_user_prefs} ( require_login int(4) unsigned NOT NULL default \'0\', uid int(10) unsigned NOT NULL default \'0\', notification int(4) unsigned NOT NULL default \'0\', blind int(4) unsigned NOT NULL default \'0\', PRIMARY KEY (uid) )'); // event aggreagation $ret[] = update_sql('CREATE TABLE {event_item} ( iid int(10) unsigned NOT NULL, nid int(10) unsigned NOT NULL, latitude decimal(10,6) NOT NULL, longitude decimal(10,6) NOT NULL, PRIMARY KEY (iid), UNIQUE KEY (nid), INDEX (latitude), INDEX (longitude) )'); return $ret; } function civic_update_5() { $ret = array(); $max = db_result(db_query_range('SELECT iid FROM {aggregator_item} ORDER BY iid DESC', 0, 1)); if ($max) { $ret[] = update_sql('REPLACE INTO {sequences} (name, id) VALUES (\'{aggregator_item}_iid\', '. $max .')'); } return $ret; } function civic_update_6() { $ret = array(); // contact updates $ret[] = update_sql('ALTER TABLE {contact} DROP mail_csid'); $ret[] = update_sql('ALTER TABLE {contact_source_list} RENAME TO {contact_sources}'); $ret[] = update_sql('CREATE TABLE {contact_data} ( nid int(10) unsigned NOT NULL, csid int(10) unsigned NOT NULL, ffid int(10) unsigned NOT NULL, active tinyint(1) unsigned NOT NULL, data text NOT NULL, PRIMARY KEY (nid, csid, ffid), INDEX (active), INDEX (data(16)) )'); $ret[] = update_sql('DROP TABLE {contact_source}'); $fields = db_query('SELECT name, ffid FROM {form_fields} WHERE fid = %d', variable_get('contact_forms_fid', 0)); while ($field = db_fetch_object($fields)) { $result = db_query('SELECT nid, '. $field->name .' AS data, '. $field->name .'_csid AS csid FROM {contact}'); while ($row = db_fetch_object($result)) { db_query('INSERT INTO {contact_data} (nid, csid, ffid, data, active) VALUES (%d, %d, %d, \'%s\', 1) ', $row->nid, $row->csid, $field->ffid, $row->data); } $ret[] = update_sql('ALTER TABLE {contact} DROP '. $field->name); $ret[] = update_sql('ALTER TABLE {contact} DROP '. $field->name .'_csid'); $ret[] = update_sql('ALTER TABLE {users} DROP contact_'. $field->name); } // new volunteer module $ret[] = update_sql('CREATE TABLE {volunteer} ( eid int(10) unsigned NOT NULL, wanted int(3) default \'2\', uid int(11), message_approve text, message_deny text, message_wait text, message_reminder text, message_follow_up text, PRIMARY KEY (eid) )'); $ret[] = update_sql('CREATE TABLE {volunteer_contact_event} ( cid int(10) unsigned NOT NULL, rating int(2), comments text, eid int(10) unsigned NOT NULL, stage int(2) unsigned )'); return $ret; } function civic_update_7() { $ret = array(); if (db_num_rows('SELECT id FROM {sequences} WHERE name = \'{contact_sources}_csid\'') == 0) { $ret[] = update_sql('UPDATE {sequences} SET name = \'{contact_sources}_csid\' WHERE name = \'{contact_source_list}_csid\''); } // adding private message module $ret[] = update_sql('CREATE TABLE {privatemsg} ( id int(10) unsigned NOT NULL auto_increment, author int(10) unsigned NOT NULL default \'0\', recipient int(10) unsigned NOT NULL default \'0\', subject varchar(64) NOT NULL default \'\', message text, timestamp int(11) unsigned NOT NULL default \'0\', new tinyint(3) unsigned NOT NULL default \'0\', hostname varchar(255) NOT NULL default \'\', folder int(10) unsigned NOT NULL default \'0\', author_del tinyint(3) unsigned NOT NULL default \'0\', recipient_del tinyint(3) unsigned NOT NULL default \'0\', PRIMARY KEY (id), KEY recipient (recipient), KEY folder (folder) )'); $ret[] = update_sql('CREATE TABLE {privatemsg_archive} ( id int(10) unsigned NOT NULL auto_increment, author int(10) unsigned NOT NULL default \'0\', recipient int(10) unsigned NOT NULL default \'0\', subject varchar(64) NOT NULL default \'\', message text NOT NULL, timestamp int(11) unsigned NOT NULL default \'0\', hostname varchar(255) NOT NULL default \'\', folder int(10) unsigned NOT NULL default \'0\', PRIMARY KEY (id), KEY recipient (recipient) )'); $ret[] = update_sql('CREATE TABLE {privatemsg_folder} ( fid int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default \'0\', name varchar(255) NOT NULL default \'\', PRIMARY KEY (fid) )'); $ret[] = update_sql('INSERT INTO {privatemsg_folder} VALUES (1,0,\'Sent\') '); // simple story creation from RSS items $ret[] = update_sql('CREATE TABLE {story_item} ( iid int(10) unsigned NOT NULL default \'0\', nid int(10) unsigned NOT NULL default \'0\', PRIMARY KEY (iid), UNIQUE KEY nid (nid) )'); return $ret; } function civic_update_8() { $ret = array(); // Remove the navigation module $ret[] = update_sql('DROP TABLE {menu}'); $ret[] = update_sql('DROP TABLE {menu_item}'); $ret[] = update_sql('DROP TABLE {menu_hierarchy}'); // The Drupal 4.4.x -> 4.5.x updates $ret = array_merge($ret, update_80()); $ret = array_merge($ret, update_81()); $ret = array_merge($ret, update_82()); $ret = array_merge($ret, update_83()); $ret = array_merge($ret, update_84()); // update 85 is not applicable because it is for the aggregator module $ret = array_merge($ret, update_86()); $ret = array_merge($ret, update_87()); $ret = array_merge($ret, update_88()); $ret = array_merge($ret, update_89()); $ret = array_merge($ret, update_90()); $ret = array_merge($ret, update_91()); $ret = array_merge($ret, update_92()); $ret = array_merge($ret, update_93()); $ret = array_merge($ret, update_94()); $ret = array_merge($ret, update_95()); $ret = array_merge($ret, update_96()); $ret = array_merge($ret, update_97()); $ret = array_merge($ret, update_98()); $ret = array_merge($ret, update_99()); $ret = array_merge($ret, update_100()); $ret = array_merge($ret, update_101()); $ret = array_merge($ret, update_102()); $ret = array_merge($ret, update_103()); $ret = array_merge($ret, update_104()); $ret = array_merge($ret, update_105()); $ret = array_merge($ret, update_106()); $ret = array_merge($ret, update_107()); $ret = array_merge($ret, update_108()); $ret = array_merge($ret, update_109()); // Add phplist module $ret[] = update_sql("CREATE TABLE {phplist_config} ( item varchar(35) NOT NULL default '', value longtext, editable tinyint(4) default '1', type varchar(25) default NULL, PRIMARY KEY (item) )"); $ret[] = update_sql("CREATE TABLE {phplist_contact_searches} ( csid int(10) unsigned NOT NULL default '0', lid int(10) unsigned NOT NULL default '0', PRIMARY KEY (csid,lid) )"); $ret[] = update_sql("CREATE TABLE {phplist_list} ( public tinyint(1) NOT NULL default '0', id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL default '', description text, entered datetime default NULL, listorder int(11) default NULL, prefix varchar(10) default NULL, rssfeed varchar(255) default NULL, modified timestamp(14) NOT NULL, active tinyint(4) default NULL, owner int(11) default NULL, PRIMARY KEY (id) )"); $ret[] = update_sql("CREATE TABLE {phplist_listmessage} ( id int(11) NOT NULL auto_increment, messageid int(11) NOT NULL default '0', listid int(11) NOT NULL default '0', entered datetime default NULL, modified timestamp(14) NOT NULL, PRIMARY KEY (id), UNIQUE KEY messageid (messageid,listid) )"); $ret[] = update_sql("CREATE TABLE {phplist_listuser} ( userid int(11) NOT NULL default '0', listid int(11) NOT NULL default '0', entered datetime default NULL, modified timestamp(14) NOT NULL, PRIMARY KEY (userid,listid) )"); $ret[] = update_sql("CREATE TABLE {phplist_message} ( id int(11) NOT NULL auto_increment, subject varchar(255) NOT NULL default '', fromfield varchar(255) NOT NULL default '', tofield varchar(255) NOT NULL default '', replyto varchar(255) NOT NULL default '', message text, textmessage text, footer text, entered datetime default NULL, modified timestamp(14) NOT NULL, embargo datetime default NULL, repeat int(11) default '0', repeatuntil datetime default NULL, status enum('submitted','inprocess','sent','cancelled','prepared','draft') default NULL, userselection text, sent datetime default NULL, htmlformatted tinyint(4) default '0', sendformat varchar(20) default NULL, template int(11) default NULL, processed mediumint(8) unsigned default '0', astext int(11) default '0', ashtml int(11) default '0', astextandhtml int(11) default '0', aspdf int(11) default '0', astextandpdf int(11) default '0', viewed int(11) default '0', bouncecount int(11) default '0', sendstart datetime default NULL, rsstemplate varchar(100) default NULL, owner int(11) default NULL, PRIMARY KEY (id) )"); $ret[] = update_sql("CREATE TABLE {phplist_rssitem} ( id int(11) NOT NULL auto_increment, title varchar(100) NOT NULL default '', link varchar(100) NOT NULL default '', source varchar(255) default NULL, list int(11) default NULL, added datetime default NULL, processed mediumint(8) unsigned default '0', astext int(11) default '0', ashtml int(11) default '0', PRIMARY KEY (id), KEY title (title,link) )"); $ret[] = update_sql("CREATE TABLE {phplist_sendprocess} ( id int(11) NOT NULL auto_increment, started datetime default NULL, modified timestamp(14) NOT NULL, alive int(11) default '1', ipaddress varchar(50) default NULL, page varchar(100) default NULL, PRIMARY KEY (id) )"); $ret[] = update_sql("CREATE TABLE {phplist_user_attribute} ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL default '', type varchar(30) default NULL, listorder int(11) default NULL, default_value varchar(255) default NULL, required tinyint(4) default NULL, tablename varchar(255) default NULL, PRIMARY KEY (id) )"); $ret[] = update_sql("CREATE TABLE {phplist_user_rss} ( userid int(11) NOT NULL default '0', last datetime default NULL, PRIMARY KEY (userid) )"); $ret[] = update_sql("CREATE TABLE {phplist_user_user} ( id int(11) NOT NULL auto_increment, drupalid int(10) unsigned NOT NULL default '0', email varchar(255) NOT NULL default '', confirmed tinyint(4) default '0', bouncecount int(11) default '0', entered datetime default NULL, modified timestamp(14) NOT NULL, uniqid varchar(255) default NULL, htmlemail tinyint(4) default '0', subscribepage int(11) default NULL, rssfrequency varchar(100) default NULL, password varchar(255) default NULL, passwordchanged date default NULL, disabled tinyint(4) default '0', extradata text, foreignkey varchar(100) default NULL, PRIMARY KEY (id), UNIQUE KEY email (email), KEY idx_phplist_user_user_uniqid (uniqid) )"); $ret[] = update_sql("CREATE TABLE {phplist_usermessage} ( messageid int(11) NOT NULL default '0', userid int(11) NOT NULL default '0', entered timestamp(14) NOT NULL, viewed datetime default NULL, PRIMARY KEY (userid,messageid) )"); // Add trackback module $ret[] = update_sql('CREATE TABLE {trackback_received} ( nid int(10) unsigned NOT NULL, cid int(10) unsigned NOT NULL, url varchar(255) NOT NULL default \'\', PRIMARY KEY (nid, cid) )'); $ret[] = update_sql('CREATE TABLE {trackback_sent} ( nid int(10) unsigned NOT NULL, url varchar(255) NOT NULL default \'\', successful tinyint(1) NOT NULL, PRIMARY KEY (nid, url) )'); // image module update if ($GLOBALS["db_type"] == "pgsql") { $ret[] = update_sql("ALTER TABLE {image} ADD image_list(carchar(255))"); } else { $ret[] = update_sql("ALTER TABLE {image} ADD image_list LONGTEXT"); } // mailhandler update $ret[] = update_sql("ALTER TABLE {mailhandler} ADD delete_after_read tinyint unsigned not null default '1'"); // flexinode update $ret[] = update_sql("ALTER TABLE {flexinode_field} ADD show_teaser int(1) NOT NULL default '0'"); $ret[] = update_sql("ALTER TABLE {flexinode_field} ADD show_table int(1) NOT NULL default '0'"); // set the theme to democratica $ret[] = update_sql("DELETE FROM {system} WHERE name = 'democratica'"); $ret[] = update_sql("REPLACE INTO {system} VALUES ('themes/engines/phptemplate/phptemplate.engine','phptemplate','theme_engine','',1,0,0)"); $ret[] = update_sql("REPLACE INTO {system} VALUES ('themes/democratica/page.tpl.php','democratica','theme','themes/engines/phptemplate/phptemplate.engine',1,0,0)"); variable_set('theme_default', 'democratica'); variable_set('phptemplate_extra_templates', unserialize("a:1:{s:18:\"themes/democratica\";a:1:{s:31:\"themes/democratica/page.tpl.php\";O:8:\"stdClass\":2:{s:8:\"filename\";s:31:\"themes/democratica/page.tpl.php\";s:4:\"name\";s:8:\"page.tpl\";}}}")); variable_set('phptemplate_extra_logic', unserialize("a:1:{s:31:\"themes/democratica/template.php\";s:31:\"themes/democratica/template.php\";}")); variable_set('theme_democratica_settings', unserialize("a:9:{s:12:\"default_logo\";s:1:\"0\";s:9:\"logo_path\";s:0:\"\";s:11:\"toggle_name\";s:1:\"1\";s:13:\"toggle_slogan\";s:1:\"0\";s:14:\"toggle_mission\";s:1:\"1\";s:20:\"toggle_primary_links\";s:1:\"1\";s:22:\"toggle_secondary_links\";s:1:\"1\";s:24:\"toggle_node_user_picture\";s:1:\"0\";s:27:\"toggle_comment_user_picture\";s:1:\"0\";}")); return $ret; } function civic_update_9() { $ret = array(); // trackback updates $ret[] = update_sql('ALTER TABLE {trackback_received} ADD trid int(10) unsigned NOT NULL'); $ret[] = update_sql('ALTER TABLE {trackback_received} ADD created int(11) NOT NULL'); $ret[] = update_sql('ALTER TABLE {trackback_received} ADD site varchar(255) NOT NULL'); $ret[] = update_sql('ALTER TABLE {trackback_received} ADD name varchar(60) default NULL'); $ret[] = update_sql('ALTER TABLE {trackback_received} ADD subject varchar(64) NOT NULL'); $ret[] = update_sql('ALTER TABLE {trackback_received} ADD excerpt varchar(255) NOT NULL'); $ret[] = update_sql("CREATE TABLE {trackback_node} ( nid int(10) unsigned NOT NULL, awaiting_cron tinyint(1) NOT NULL, can_receive tinyint(1) NOT NULL, PRIMARY KEY (nid) )"); $result = db_query('SELECT tr.nid, tr.cid, c.timestamp, c.homepage, c.name, c.subject, c.comment FROM {trackback_received} tr LEFT JOIN {comments} c ON tr.cid = c.cid'); while ($trackback = db_fetch_object($result)) { $trid = db_next_id('{trackback_received}_trid'); db_query("UPDATE {trackback_received} SET trid = %d, created = %d, site = '%s', name = '%s', subject = '%s', excerpt = '%s' WHERE nid = %d AND cid = %d", $trid, $trackback->timestamp, $trackback->homepage, $trackback->name, $trackback->subject, $trackback->comment, $trackback->nid, $trackback->cid); _comment_delete_thread($trackback); _comment_update_node_statistics($trackback->nid); } $ret[] = update_sql('ALTER TABLE {trackback_received} DROP PRIMARY KEY'); $ret[] = update_sql('ALTER TABLE {trackback_received} DROP cid'); $ret[] = update_sql('ALTER TABLE {trackback_received} ADD PRIMARY KEY (trid)'); return $ret; } function civic_update_10() { $ret = array(); // Drupal 4.5.x update for comment counts. $ret = array_merge($ret, update_110()); // New wmfilter module. $ret[] = update_sql('CREATE TABLE {interwiki} ( iw_prefix char(32) NOT NULL, iw_url char(127) NOT NULL, iw_local BOOL NOT NULL, UNIQUE KEY iw_prefix (iw_prefix) )'); $ret[] = update_sql("INSERT INTO {interwiki} VALUES ('kos','http://www.dkosopedia.com/index.php/$1',1)"); $ret[] = update_sql("INSERT INTO {interwiki} VALUES ('w','http://en.wikipedia.org/wiki/$1',1)"); $ret[] = update_sql("INSERT INTO {interwiki} VALUES ('dis','http://www.disinfopedia.org/wiki.phtml?title=$1',1)"); // phplist database upgrade path 2.8.11 -> 2.9.3 $ret[] = update_sql('ALTER TABLE {phplist_user_user} ADD blacklisted tinyint default 0'); $ret[] = update_sql('CREATE TABLE {phplist_user_blacklist} ( email varchar(255) not null unique, added datetime )'); $ret[] = update_sql('CREATE TABLE {phplist_user_blacklist_data} ( email varchar(255) not null unique, name varchar(100), data text )'); $ret[] = update_sql('ALTER TABLE {phplist_message} CHANGE repeat repeatinterval INTEGER'); $ret[] = update_sql('CREATE TABLE {phplist_messagedata} ( name varchar(100) not null, id integer not null, data text, PRIMARY KEY (name, id) )'); $ret[] = update_sql('ALTER TABLE {phplist_usermessage} MODIFY entered datetime'); $ret[] = update_sql('ALTER TABLE {phplist_usermessage} ADD status varchar(255)'); $ret[] = update_sql('CREATE TABLE {phplist_sessiontable} ( sessionid CHAR(32) NOT NULL, lastactive INTEGER NOT NULL, data LONGTEXT, PRIMARY KEY (sessionid) )'); return $ret; } function civic_update_11() { $ret = array(); // update_111() causes problems with duplicate keys when the upgrade is being tested on the same domain // or a subdomain as the live site. In short, we need to wipe out all of the sessions in the sessions // table. A more ideal fix would be to grab the sid (session id) of the person running the update // and just deleting that from the database. db_query('DELETE FROM {sessions}'); // UPDATES for Drupal 4.5.x -> Drupal 4.6.1 $ret = array_merge($ret, update_111()); $ret = array_merge($ret, update_112()); $ret = array_merge($ret, update_113()); $ret = array_merge($ret, update_114()); $ret = array_merge($ret, update_115()); $ret = array_merge($ret, update_116()); $ret = array_merge($ret, update_117()); $ret = array_merge($ret, update_118()); $ret = array_merge($ret, update_119()); $ret = array_merge($ret, update_120()); $ret = array_merge($ret, update_121()); $ret = array_merge($ret, update_122()); $ret = array_merge($ret, update_123()); $ret = array_merge($ret, update_124()); $ret = array_merge($ret, update_125()); $ret = array_merge($ret, update_126()); $ret = array_merge($ret, update_127()); $ret = array_merge($ret, update_128()); $ret = array_merge($ret, update_129()); $ret = array_merge($ret, update_130()); $ret = array_merge($ret, update_131()); // END OF UPDATES for Drupal 4.5.x -> Drupal 4.6.1 // UPDATE for renaming 'contact' to 'contact_manager' $contact_manager_block_source = variable_get('contact_block_source', -1); $contact_manager_forms_fid = variable_get('contact_forms_fid', -1); variable_del('contact_block_source'); variable_del('contact_forms_fid'); variable_set('contact_manager_block_source', $contact_manager_block_source); variable_set('contact_manager_forms_fid', $contact_manager_forms_fid); update_sql('RENAME TABLE {contact} TO {contact_manager}'); update_sql('RENAME TABLE {contact_data} TO {contact_manager_data}'); update_sql('RENAME TABLE {contact_search} TO {contact_manager_search}'); update_sql('RENAME TABLE {contact_sources} TO {contact_manager_sources}'); update_sql("CREATE TABLE {contact_manager_forms} ( fid int(10) unsigned NOT NULL default '0', type varchar(16) NOT NULL default '', created int(10) NOT NULL default '0', PRIMARY KEY (fid) )"); update_sql("CREATE TABLE {contact_manager_form_fields} ( ffid int(10) unsigned NOT NULL auto_increment, fid int(10) unsigned NOT NULL default '0', title varchar(255) default NULL, name varchar(128) default NULL, explanation text, page varchar(255) default NULL, type varchar(128) default NULL, weight tinyint(1) NOT NULL default '0', required tinyint(1) NOT NULL default '0', flags text, validation text, options text, multiple tinyint(1) NOT NULL default '0', PRIMARY KEY (ffid), UNIQUE KEY fid (fid, name) )"); if ($contact_manager_forms_fid >= 0) { // Take row for contact_manager form from {form} table and move it to {contact_manager_form} table $result = db_query('SELECT * FROM {forms} WHERE fid = %d', $contact_manager_forms_fid); if ($row = db_fetch_object($result)) { db_query("INSERT INTO {contact_manager_forms} (fid, type, created) VALUES (%d, '%s', %d)", $row->fid, $row->type, $row->created); db_query("DELETE FROM {forms} WHERE fid = %d", $row->fid); } // Take rows for contact_manager form fields in {form_fields} table and move them to {contact_manager_form_fields} table $result = db_query('SELECT * FROM {form_fields} WHERE fid = %d', $contact_manager_forms_fid); while ($form_field = db_fetch_object($result)) { db_query("INSERT INTO {contact_manager_form_fields} (ffid, fid, title, name, explanation, page, type, weight, required, flags, validation, options, multiple) VALUES (%d, %d, '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', %d)", $form_field->ffid, $form_field->fid, $form_field->title, $form_field->name, $form_field->explanation, $form_field->page, $form_field->type, $form_field->weight, $form_field->required, $form_field->flags, $form_field->validation, $form_field->options, $form_field->multiple); } // Create a seperate {contact_manager_form_fields}_ffid in addition to existing {form_fields}_ffid in sequences table // Inititally set it to be the maximum ffid of all current contact_manager_form_field ffid's $result = db_query('SELECT MAX(ffid) AS ffid FROM {contact_manager_form_fields}'); if ($row = db_fetch_object($result)) { if ($row->ffid > 0) { db_query('LOCK TABLES {sequences} WRITE'); db_query("INSERT INTO {sequences} VALUES ('{contact_manager_form_fields}_ffid', %d)", $name, $row->ffid); db_query('UNLOCK TABLES'); } } db_query('DELETE FROM {form_fields} WHERE fid = %d', $contact_manager_forms_fid); db_query('DELETE FROM {forms} WHERE fid = %d', $contact_manager_forms_fid); // Change {sequence} values to use 'contact_manager' in place of 'contact' $ret[] = update_sql("UPDATE {sequences} SET name = '{contact_manager_sources}_csid' WHERE name = '{contact_sources}_csid'"); $ret[] = update_sql("UPDATE {sequences} SET name = '{contact_manager_search}_sid' WHERE name = '{contact_search}_sid'"); // Change {blocks} value to use 'contact_manager' in place of 'contact' $ret[] = update_sql("UPDATE {blocks} SET module = 'contact_manager' WHERE module = 'contact'"); // Automatically enable the new contact_manager_form module if contact (now contact_manager) was previously enabled. $result = db_query("SELECT status FROM {system} WHERE type = 'module' AND name = 'contact'"); if ($row = db_fetch_object($result)) { if ($row->status) { $ret[] = db_query("INSERT INTO {system} (filename, name, type, status, bootstrap) VALUES ('modules/contact_manager/contact_manager_forms.module', 'contact_manager_forms', 'module', 1, 0)"); } } } $row = db_query("UPDATE {system} SET name = 'contact_manager', filename = 'modules/contact_manager/contact_manager.module' WHERE name = 'contact' AND type = 'module'"); // Finally, update the 'type' column in the {node} table to indicate 'contact_manager' in place of 'contact' $ret[] = update_sql("UPDATE {node} SET type = 'contact_manager' WHERE type = 'contact'"); // END OF UPDATE for renaming 'contact' to 'contact_manager' // UPDATE for event taken straight from update-event.php in contributions/modules/event directory from cvs.drupal.org, // but modified a little. $ctype_id = db_next_id('{flexinode_ctype}'); $vals[] = $ctype_id; $vals[] = 'event'; $vals[] = 'This is the event type setup by update_event.php'; $vals[] = 'You can change this text by going to the flexinode content configuration page'; if(!db_query("INSERT INTO {flexinode_type} (ctype_id, name, description, help) VALUES (%d, '%s', '%s', '%s')", $vals)) { die('unable to create new flexinode type'); } $flex_fields = array('password' => 'textfield', 'textfield' => 'textfield', 'textarea' => 'textarea', 'select' => 'select', 'radios' => 'select', 'checkbox' => 'checkbox', 'file' => 'file', 'email_address' => 'email', 'url' => 'url' ); $results = db_query("SELECT fi.* FROM {forms} f LEFT JOIN {form_fields} fi ON f.fid = fi.fid WHERE f.type = 'event'"); while($field = db_fetch_object($results)) { $field_id = db_next_id('{flexinode_field}'); $map[$field->name] = $field_id; // leaving this here to make it easier to see the field mapping later $flags = unserialize($field->flags); $edit['show_teaser'] = ($flags['publish'] ? TRUE : FALSE); $type = ($field->validation != '--' ? $field->validation : $field->type); $edit['field_type'] = $flex_fields[$type]; $types[$field->name] = $flex_fields[$type]; $edit['label'] = $field->title; $edit['required'] = $field->required; // want $options = update_event_forms_options($field->options) $array = explode(';', $field->options); $options = array(); foreach ($array as $opt) { list($key, $value) = explode(':', $opt); $key = trim($key); if ($value) { $options[] = trim($value); } else { $options[] = $key; } } // $options now needs to be serialized $options = serialize($options); $edit['description'] = $field->explanation; $edit['weight'] = $field->weight; db_query("INSERT INTO {flexinode_field} (label, default_value, rows, required, show_teaser, show_table, weight, ctype_id, field_type, options, description, field_id) VALUES ('%s', '%s', %d, %d, %d, %d, %d, %d, '%s', '%s', '%s', %d)", $edit['label'], '', 5, $edit['required'], $edit['show_teaser'], TRUE, $edit['weight'], $ctype_id, $edit['field_type'], $options, $edit['description'], $field_id); } $field_id = db_next_id('{flexinode_field}'); db_query("INSERT INTO {flexinode_field} (label, default_value, rows, required, show_teaser, show_table, weight, ctype_id, field_type, description, field_id) VALUES ('%s', '%s', %d, %d, %d, %d, %d, %d, '%s', '%s', %d)", 'description', '', 10, 0, 1, 1, 0, $ctype_id, 'textarea', 'description field', $field_id); $map['node_body'] = $field_id; $events = db_query("SELECT * FROM {event} e LEFT JOIN {node} n ON n.nid = e.nid"); while($event = db_fetch_object($events)) { $field->field_id = $map['node_body']; $field->nid = $event->nid; $value = $event->body; // Following line is the only line from update_event_textarea_insert() db_query("INSERT INTO {flexinode_data} (nid, field_id, textual_data, numeric_data) VALUES (%d, %d, '%s', %d)", $field->nid, $field->field_id, $value, 0); $fields = db_query("SELECT f.*, ff.* FROM {event_field_data} f LEFT JOIN {event} e ON e.nid = f.nid LEFT JOIN {form_fields} ff ON ff.name = f.name WHERE e.nid = %d", $event->nid); while ($field = db_fetch_object($fields)) { $function = 'update_event_'. $types[$field->name] .'_insert'; $field->field_id = $map[$field->name]; $field->nid = $event->nid; if (function_exists($function)) { $function($field, $field->data); } } } variable_set("event_nodeapi_flexinode-$ctype_id", 'all'); db_query("UPDATE {node} set type='flexinode-$ctype_id' where type='event'"); db_query("ALTER TABLE {event} CHANGE start event_start int(10) unsigned NOT NULL default '0'"); db_query("ALTER TABLE {event} ADD KEY event_start (event_start)"); db_query("ALTER TABLE {event} ADD event_end int(10) unsigned NOT NULL default '0'"); db_query("ALTER TABLE {event} ADD timezone int(11) default NULL"); $ret[] = '
Your event fields should be transferred now. If you want to confirm this is so now is a good time.
Please execute the following sql statements directly on the database to finish the upgrade:
';
$ret[] = 'ALTER TABLE event DROP galleries;
'."\n";
$ret[] = 'ALTER TABLE event DROP location;
'."\n";
$ret[] = 'DROP TABLE event_field_data;
'."\n";
$ret[] = 'DROP TABLE event_item;
'."\n";
$ret[] = '';
// Finally, we want to make sure that flexinode is enabled, otherwise flexinode fields won't show up
// when viewing an event.
db_query("DELETE FROM {system} WHERE name = 'flexinode' AND type = 'module'");
db_query("INSERT INTO {system} (type, name, filename, status) VALUES ('module', 'flexinode', 'modules/flexinode/flexinode.module', 1)");
// END OF UPDATE for event
// ADDING MODULE eventfinder
$ret[] = update_sql("CREATE TABLE {ef_details} (
nid int(11) NOT NULL default '0',
enable_reg tinyint(4) NOT NULL default '1',
max_reg int(11) NOT NULL default '0'
)");
$ret[] = update_sql("CREATE TABLE {ef_host} (
nid int(11) NOT NULL default '0',
uid int(11) NOT NULL default '0',
created int(11) NOT NULL default '0',
PRIMARY KEY (nid,uid),
KEY nid (nid),
KEY uid (uid)
)");
$ret[] = update_sql("CREATE TABLE {ef_ref_mma} (
area_id int(11) NOT NULL auto_increment,
area_name varchar(150) default NULL,
zips text,
PRIMARY KEY (area_id)
)");
$ret[] = update_sql("CREATE TABLE {ef_register} (
nid int(11) NOT NULL default '0',
uid int(11) NOT NULL default '0',
created int(11) NOT NULL default '0',
PRIMARY KEY (`nid`,`uid`),
KEY nid (nid),
KEY uid (uid)
)");
$ret[] = update_sql("CREATE TABLE {ef_saved_searches} (
sid int(11) NOT NULL auto_increment,
uid int(11) NOT NULL default '0',
title varchar(60) NOT NULL default '',
ss_sql text NOT NULL,
ss_crit text NOT NULL,
created int(11) NOT NULL default '0',
last_run int(11) NOT NULL default '0',
official int(11) NOT NULL default '0',
UNIQUE KEY sid (sid)
)");
$ret[] = update_sql("CREATE TABLE {ef_ss_node} (
sid int(11) NOT NULL default '0',
nid int(11) NOT NULL default '0',
begin int(11) NOT NULL default '0'
)");
db_query("INSERT INTO {ef_ref_mma} VALUES (5000, 'AKRON OH', '44056,44067,44087,44201,44202,44203,44210,44211,44216,44221,44222,44223,44224,44231,44232,44234,44236,44237,44238,44240,44241,44242,44243,44250,44255,44260,44262,44264,44265,44266,44272,44278,44285,44286,44288,44301,44302,44303,44304,44305,44306,44307,44308,44309,44310,44311,44312,44313,44314,44315,44316,44317,44319,44320,44321,44322,44325,44326,44328,44333,44334,44372,44393,44396,44397,44398,44399,44411,44412,44685')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5001, 'ATLANTA GA', '30002,30003,30004,30005,30006,30007,30008,30009,30010,30011,30012,30013,30014,30015,30016,30017,30018,30019,30021,30022,30023,30024,30025,30026,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30041,30042,30043,30044,30045,30046,30047,30048,30049,30052,30054,30055,30058,30060,30061,30062,30064,30065,30066,30067,30068,30069,30070,30071,30072,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087,30088,30090,30091,30092,30093,30094,30095,30096,30097,30098,30099,30101,30102,30103,30106,30107,30108,30109,30111,30114,30115,30116,30117,30118,30119,30120,30121,30122,30123,30126,30127,30132,30133,30134,30135,30137,30141,30142,30143,30144,30145,30146,30148,30150,30151,30152,30154,30156,30157,30160,30168,30171,30175,30177,30178,30179,30180,30182,30183,30184,30185,30187,30188,30189,30205,30212,30213,30214,30215,30220,30223,30224,30228,30229,30232,30236,30237,30238,30248,30250,30252,30253,30259,30260,30263,30264,30265,30266,30268,30269,30271,30272,30273,30274,30275,30276,30277,30281,30284,30287,30288,30289,30290,30291,30294,30296,30297,30298,30301,30302,30303,30304,30305,30306,30307,30308,30309,30310,30311,30312,30313,30314,30315,30316,30317,30318,30319,30320,30321,30322,30324,30325,30326,30327,30328,30329,30330,30331,30332,30333,30334,30336,30337,30338,30339,30340,30341,30342,30343,30344,30345,30346,30347,30348,30349,30350,30353,30354,30355,30356,30357,30358,30359,30360,30361,30362,30364,30366,30368,30369,30370,30371,30374,30375,30376,30377,30379,30380,30384,30385,30386,30387,30388,30389,30390,30392,30394,30396,30398,30399,30515,30518,30519,30620,30641,30655,30656,30666,30680,31106,31107,31119,31126,31131,31139,31141,31145,31146,31150,31156,31191,31192,31193,31195,31196,31197,31198,31199,39901')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5002, 'BALTIMORE MD', '21001,21005,21009,21010,21012,21013,21014,21015,21017,21018,21020,21022,21023,21027,21028,21029,21030,21031,21032,21034,21035,21036,21037,21040,21041,21042,21043,21044,21045,21046,21047,21048,21050,21051,21052,21053,21054,21055,21056,21057,21060,21061,21062,21065,21071,21074,21075,21076,21077,21078,21082,21084,21085,21087,21088,21090,21092,21093,21094,21098,21102,21104,21105,21106,21108,21111,21113,21114,21117,21120,21122,21123,21128,21130,21131,21132,21133,21136,21139,21140,21144,21146,21150,21152,21153,21154,21155,21156,21157,21158,21160,21161,21162,21163,21201,21202,21203,21204,21205,21206,21207,21208,21209,21210,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21233,21234,21235,21236,21237,21239,21240,21241,21244,21250,21251,21252,21263,21264,21265,21268,21270,21273,21274,21275,21278,21279,21280,21281,21282,21283,21284,21285,21286,21287,21288,21289,21290,21297,21298,21401,21402,21403,21404,21405,21411,21412,21607,21617,21619,21623,21628,21638,21644,21656,21657,21658,21666,21668,21670,21723,21737,21738,21759,21765,21776,21784,21787,21791,21794,21797,20701,20711,20723,20724,20733,20751,20755,20758,20759,20763,20764,20765,20776,20777,20778,20779,20794')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5003, 'BERGEN-PASSAIC NJ', '07020,07022,07024,07026,07031,07055,07057,07070,07071,07072,07073,07074,07075,07401,07403,07407,07410,07417,07420,07421,07423,07424,07430,07432,07435,07436,07442,07446,07450,07451,07452,07456,07458,07463,07465,07470,07474,07477,07480,07481,07495,07498,07501,07502,07503,07504,07505,07506,07507,07508,07509,07510,07511,07512,07513,07514,07522,07524,07533,07538,07543,07544,07601,07602,07603,07604,07605,07606,07607,07608,07620,07621,07624,07626,07627,07628,07630,07631,07632,07640,07641,07642,07643,07644,07645,07646,07647,07648,07649,07650,07652,07653,07656,07657,07660,07661,07662,07663,07666,07670,07675,07676,07677,07010,07011,07012,07013,07014,07015')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5004, 'BIRMINGHAM AL', '35004,35005,35006,35007,35013,35015,35020,35021,35022,35023,35031,35036,35040,35041,35043,35048,35049,35051,35052,35054,35060,35061,35062,35064,35068,35071,35073,35078,35079,35080,35091,35094,35097,35111,35112,35114,35115,35116,35117,35118,35119,35120,35121,35123,35124,35125,35126,35127,35128,35131,35133,35135,35137,35139,35142,35143,35144,35146,35147,35172,35173,35176,35178,35180,35181,35182,35185,35186,35187,35201,35202,35203,35204,35205,35206,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35228,35229,35230,35231,35232,35233,35234,35235,35236,35237,35238,35240,35242,35243,35244,35245,35246,35249,35253,35254,35255,35259,35260,35261,35266,35277,35278,35279,35280,35281,35282,35283,35285,35286,35287,35288,35289,35290,35291,35292,35293,35294,35295,35296,35297,35298,35299,35953,35972,35987')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5005, 'BOSTON MA-NH', '03874,00157,01432,01451,01460,01464,01467,01469,01474,01503,01504,01523,01529,01561,01568,01701,01702,01703,01704,01705,01718,01719,01720,01721,01730,01731,01740,01741,01742,01745,01746,01747,01748,01749,01752,01754,01756,01757,01760,01770,01772,01773,01775,01776,01778,01784,01801,01803,01805,01806,01807,01808,01813,01815,01864,01867,01880,01887,01888,01889,01890,01901,01902,01903,01904,01905,01906,01907,01908,01910,01913,01915,01922,01923,01929,01930,01931,01936,01937,01938,01940,01944,01945,01949,01950,01951,01952,01960,01961,01965,01966,01969,01970,01971,01982,01983,01984,02018,02019,02020,02021,02025,02026,02027,02030,02032,02035,02038,02040,02041,02043,02044,02045,02047,02048,02050,02051,02052,02053,02054,02055,02056,02059,02060,02061,02062,02065,02066,02067,02070,02071,02072,02081,02090,02093,02101,02102,02103,02104,02105,02106,02107,02108,02109,02110,02111,02112,02113,02114,02115,02116,02117,02118,02119,02120,02121,02122,02123,02124,02125,02126,02127,02128,02129,02130,02131,02132,02133,02134,02135,02136,02137,02138,02139,02140,02141,02142,02143,02144,02145,02148,02149,02150,02151,02152,02153,02155,02156,02163,02169,02170,02171,02176,02180,02184,02185,02186,02187,02188,02189,02190,02191,02196,02199,02201,02202,02203,02204,02205,02206,02207,02208,02209,02210,02211,02212,02215,02216,02217,02222,02228,02238,02239,02241,02266,02269,02283,02284,02293,02295,02297,02327,02330,02331,02332,02339,02340,02343,02345,02355,02358,02359,02360,02361,02362,02364,02366,02368,02370,02381,02420,02421,02445,02446,02447,02451,02452,02453,02454,02455,02456,02457,02458,02459,02460,02461,02462,02464,02465,02466,02467,02468,02471,02472,02474,02475,02476,02477,02478,02479,02481,02482,02492,02493,02494,02495,02538,02558,02571,02576,02712,02715,02718,02762,02764,02766,02779,02780')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5006, 'BRIDGEPORT CT', '06401,06403,06418,06430,06431,06432,06460,06468,06478,06483,06484,06490,06491,06601,06602,06604,06605,06606,06607,06608,06610,06611,06612,06614,06615,06673,06699')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5007, 'CHARLOTTE, NC / SC', '27013,27054,28041,28088,28159,28025,28126,28168,28111,28052,28054,28098,28112,28174,28173,28012,28006,28016,28021,28023,28026,28027,28031,28032,28033,28034,28035,28056,28036,28037,28039,28053,28055,28070,28071,28072,28075,28077,28078,28079,28080,28081,28082,28083,28092,28093,28101,28103,28104,28105,28106,28107,28108,28110,28120,28124,28125,28130,28134,28137,28138,28144,28145,28146,28147,28164,28201,28202,28203,28204,28205,28206,28207,28208,28209,28210,28211,28212,28213,28214,28215,28216,28217,28218,28219,28220,28221,28222,28223,28224,28226,28227,28228,28229,28230,28231,28232,28233,28234,28235,28236,28237,28240,28241,28242,28243,28244,28246,28247,28253,28254,28256,28258,28260,28261,28262,28265,28266,28269,28270,28271,28272,28273,28274,28275,28277,28278,28280,28281,28282,28283,28284,28285,28287,28289,28290,28296,28297,28299,29745,29703,29704,29708,29710,29715,29716,29717,29726,29730,29731,29732,29734,29742,29743')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5008, 'CHICAGO IL', '60001,60002,60004,60005,60006,60007,60008,60009,60010,60011,60012,60013,60014,60015,60016,60017,60018,60020,60021,60022,60025,60026,60029,60030,60031,60033,60034,60035,60037,60038,60039,60040,60041,60042,60043,60044,60045,60046,60047,60048,60049,60050,60051,60053,60055,60056,60060,60061,60062,60064,60065,60067,60068,60069,60070,60071,60072,60073,60074,60075,60076,60077,60078,60079,60080,60081,60082,60083,60084,60085,60086,60087,60088,60089,60090,60091,60092,60093,60094,60095,60096,60097,60098,60099,60101,60102,60103,60104,60105,60106,60107,60108,60109,60110,60111,60112,60115,60116,60117,60118,60119,60120,60121,60122,60123,60125,60126,60128,60129,60130,60131,60132,60133,60134,60135,60136,60137,60138,60139,60140,60141,60142,60143,60144,60145,60146,60147,60148,60150,60151,60152,60153,60154,60155,60156,60157,60159,60160,60161,60162,60163,60164,60165,60168,60170,60171,60172,60173,60174,60175,60176,60177,60178,60179,60180,60181,60182,60183,60184,60185,60186,60187,60188,60189,60190,60191,60192,60193,60194,60195,60196,60197,60199,60201,60202,60203,60204,60208,60209,60301,60302,60303,60304,60305,60399,60401,60402,60406,60407,60408,60409,60410,60411,60412,60415,60416,60417,60419,60421,60422,60423,60424,60425,60426,60429,60430,60431,60432,60433,60434,60435,60436,60437,60438,60439,60440,60441,60442,60443,60444,60445,60446,60447,60448,60449,60450,60451,60452,60453,60454,60455,60456,60457,60458,60459,60461,60462,60463,60464,60465,60466,60467,60468,60469,60471,60472,60473,60474,60475,60476,60477,60478,60479,60480,60481,60482,60490,60499,60501,60504,60505,60506,60507,60510,60511,60512,60513,60514,60515,60516,60517,60519,60520,60521,60522,60523,60525,60526,60527,60532,60534,60536,60537,60538,60539,60540,60541,60542,60543,60544,60545,60546,60548,60550,60552,60554,60555,60556,60558,60559,60560,60561,60563,60564,60565,60566,60567,60568,60570,60572,60597,60598,60599,60601,60602,60603,60604,60605,60606,60607,60608,60609,60610,60611,60612,60613,60614,60615,60616,60617,60618,60619,60620,60621,60622,60623,60624,60625,60626,60628,60629,60630,60631,60632,60633,60634,60636,60637,60638,60639,60640,60641,60643,60644,60645,60646,60647,60649,60651,60652,60653,60654,60655,60656,60657,60659,60660,60661,60663,60664,60665,60666,60667,60668,60669,60670,60671,60672,60673,60674,60675,60677,60678,60679,60680,60681,60683,60684,60685,60686,60687,60688,60690,60691,60693,60694,60696,60697,60699,60701,60706,60707,60712,60714,60803,60804,60805,60827')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5009, 'CINCINNATI OH-KY-IN', '47001,47018,47022,47025,47032,47040,47060,41001,41005,41006,41007,41010,41011,41012,41014,41015,41016,41017,41018,41019,41022,41030,41033,41035,41040,41042,41046,41048,41051,41052,41053,41054,41059,41063,41071,41072,41073,41074,41075,41076,41080,41085,41086,41091,41092,41094,41095,41097,41099,45275,45277,45298,45944,45999,45233,45234,45235,45236,45237,45238,45239,45240,45241,45242,45243,45244,45245,45246,45247,45248,45249,45250,45251,45252,45253,45254,45255,45258,45262,45263,45264,45267,45268,45269,45270,45271,45273,45274,45280,45296,45299,45001,45002,45005,45030,45032,45033,45034,45036,45039,45040,45041,45051,45052,45054,45065,45066,45068,45101,45102,45103,45106,45111,45112,45115,45118,45119,45120,45121,45122,45130,45131,45140,45145,45147,45150,45152,45153,45154,45156,45157,45158,45160,45162,45167,45168,45171,45174,45176,45201,45202,45203,45204,45205,45206,45207,45208,45209,45210,45211,45212,45213,45214,45215,45216,45217,45218,45219,45220,45221,45222,45223,45224,45225,45226,45227,45228,45229,45230,45231,45232')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5010, 'COLUMBUS OH', '43740,43299,43721,43272,43279,43287,43291,43240,43251,43260,43265,43266,43268,43270,43271,43110,43112,43113,43116,43117,43119,43123,43125,43126,43130,43136,43137,43140,43143,43145,43146,43147,43148,43150,43151,43153,43154,43155,43156,43157,43162,43163,43164,43196,43198,43199,43201,43202,43203,43204,43205,43206,43207,43209,43210,43211,43212,43213,43214,43215,43216,43217,43218,43219,43220,43221,43222,43223,43224,43226,43227,43228,43229,43230,43231,43232,43234,43235,43236,43001,43002,43003,43004,43008,43013,43015,43016,43017,43018,43021,43023,43025,43026,43027,43029,43030,43031,43032,43033,43035,43046,43054,43055,43056,43058,43061,43062,43064,43065,43066,43068,43071,43073,43074,43081,43082,43085,43086,43093,43098,43102,43103,43105,43107,43109')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5011, 'DALLAS TX', '75758,75763,75770,75778,75782,76041,76064,76065,76084,76201,76202,76203,76204,76205,76206,76207,76208,76209,76210,76226,76227,76247,76249,76258,76259,76262,76266,76623,76651,76670,75001,75007,75011,75022,75023,75024,75002,75006,75009,75010,75013,75014,75015,75016,75017,75019,75025,75026,75027,75028,75029,75030,75032,75034,75035,75037,75038,75039,75040,75041,75042,75043,75044,75045,75046,75047,75048,75049,75050,75051,75052,75053,75054,75056,75057,75060,75061,75062,75063,75065,75067,75068,75069,75070,75071,75074,75075,75077,75078,75080,75081,75082,75083,75085,75086,75087,75088,75089,75093,75094,75097,75098,75099,75101,75104,75106,75114,75115,75116,75118,75119,75120,75121,75123,75124,75125,75126,75132,75134,75135,75137,75138,75141,75142,75143,75146,75147,75148,75149,75150,75152,75154,75157,75158,75159,75160,75161,75163,75164,75165,75166,75167,75168,75172,75173,75180,75181,75182,75185,75187,75189,75201,75202,75203,75204,75205,75206,75207,75208,75209,75210,75211,75212,75214,75215,75216,75217,75218,75219,75220,75221,75222,75223,75224,75225,75226,75227,75228,75229,75230,75231,75232,75233,75234,75235,75236,75237,75238,75240,75241,75242,75243,75244,75245,75246,75247,75248,75249,75250,75251,75252,75253,75254,75258,75260,75262,75263,75264,75265,75266,75267,75270,75275,75277,75283,75284,75285,75286,75287,75301,75303,75310,75312,75313,75315,75320,75323,75326,75336,75339,75342,75353,75354,75355,75356,75357,75359,75360,75363,75364,75367,75368,75370,75371,75372,75373,75374,75376,75378,75379,75380,75381,75382,75386,75387,75388,75389,75390,75391,75392,75393,75394,75395,75396,75397,75398,75401,75402,75403,75404,75407,75409,75422,75423,75424,75428,75429,75442,75452,75453,75454,75458,75474,75485,75496,75751,75752,75756')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5012, 'DAYTONA BEACH FL', '32105,32110,32114,32115,32116,32117,32118,32119,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32132,32135,32136,32137,32141,32142,32151,32164,32168,32169,32170,32173,32174,32175,32176,32180,32190,32198,32706,32713,32720,32721,32722,32724,32725,32728,32738,32739,32744,32753,32759,32763,32764,32774')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5013, 'DENVER CO', '80001,80002,80003,80004,80005,80006,80007,80010,80011,80012,80013,80014,80015,80016,80017,80018,80019,80021,80022,80024,80030,80031,80033,80034,80035,80036,80037,80040,80041,80042,80044,80045,80046,80047,80102,80103,80104,80105,80110,80111,80112,80116,80118,80120,80121,80122,80123,80124,80125,80126,80127,80128,80129,80130,80131,80134,80135,80136,80137,80138,80150,80151,80155,80160,80161,80162,80163,80165,80166,80201,80202,80203,80204,80205,80206,80207,80208,80209,80210,80211,80212,80214,80215,80216,80217,80218,80219,80220,80221,80222,80223,80224,80225,80226,80227,80228,80229,80230,80231,80232,80233,80234,80235,80236,80237,80238,80239,80241,80243,80244,80246,80248,80249,80250,80251,80252,80254,80255,80256,80257,80259,80260,80261,80262,80263,80264,80265,80266,80270,80271,80273,80274,80275,80279,80280,80281,80285,80290,80291,80292,80293,80294,80295,80299,80401,80402,80403,80419,80425,80433,80437,80439,80453,80454,80457,80465,80470,80601,80602,80614,80640')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5014, 'DETROIT MI', '48065,48066,48067,48068,48069,48070,48071,48072,48073,48074,48075,48076,48079,48080,48081,48082,48083,48084,48085,48086,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48101,48110,48111,48112,48117,48120,48121,48122,48123,48124,48125,48126,48127,48128,48131,48133,48134,48135,48136,48138,48140,48141,48144,48145,48146,48150,48151,48152,48153,48154,48157,48159,48161,48162,48164,48165,48166,48167,48170,48173,48174,48177,48178,48179,48180,48182,48183,48184,48185,48186,48187,48188,48192,48195,48201,48202,48203,48204,48205,48206,48207,48208,48209,48210,48211,48212,48213,48214,48215,48216,48217,48218,48219,48220,48221,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48242,48243,48244,48255,48260,48264,48265,48266,48267,48268,48269,48272,48275,48277,48278,48279,48288,48301,48302,48303,48304,48306,48307,48308,48309,48310,48311,48312,48313,48314,48315,48316,48317,48318,48320,48321,48322,48323,48324,48325,48326,48327,48328,48329,48330,48331,48332,48333,48334,48335,48336,48340,48341,48342,48343,48346,48347,48348,48350,48356,48357,48359,48360,48361,48362,48363,48366,48367,48370,48371,48374,48375,48376,48377,48380,48381,48382,48383,48386,48387,48390,48391,48393,48397,48398,48412,48421,48428,48435,48440,48442,48444,48446,48455,48461,48462,48464,48727,49267,49270,48001,48002,48003,48004,48005,48006,48007,48009,48012,48014,48015,48017,48021,48022,48023,48025,48026,48027,48028,48030,48032,48034,48035,48036,48037,48038,48039,48040,48041,48042,48043,48044,48045,48046,48047,48048,48049,48050,48051,48054,48059,48060,48061,48062,48063,48064')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5015, 'FITCHBURG-LEOMINSTER MA', '01473,01475,01477,01468,01462,01453,01436,01438,01440,01441,01431,01420,01430')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5016, 'FORT LAUDERDALE FL', '00041,33004,33008,33009,33019,33020,33021,33022,33023,33024,33025,33026,33027,33028,33029,33060,33061,33062,33063,33064,33065,33066,33067,33068,33069,33071,33072,33073,33074,33075,33076,33077,33081,33082,33083,33084,33093,33097,33301,33302,33303,33304,33305,33306,33307,33308,33309,33310,33311,33312,33313,33314,33315,33316,33317,33318,33319,33320,33321,33322,33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33334,33335,33337,33338,33339,33340,33345,33346,33348,33349,33351,33355,33359,33388,33394,33441,33442,33443')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5017, 'GALVESTON-TEXAS CITY TX', '77510,77517,77518,77539,77546,77549,77550,77551,77552,77553,77554,77555,77563,77565,77568,77573,77574,77590,77591,77592,77617,77623,77650')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5018, 'GRAND RAPIDS, MI', '49301,49302,49010,49070,49078,49080,49303,49306,49311,49314,49315,49316,49317,49318,49319,49321,49323,49326,49328,49330,49331,49335,49341,49345,49348,49351,49343,49344,49355,49356,49560,49588,49599,49357,49401,49403,49404,49406,49408,49409,49415,49416,49417,49418,49419,49422,49423,49424,49425,49426,49427,49428,49429,49430,49434,49435,49437,49440,49441,49442,49443,49444,49445,49448,49450,49451,49453,49456,49457,49460,49461,49463,49464,49468,49501,49502,49503,49504,49505,49506,49507,49508,49509,49510,49512,49514,49515,49516,49518,49523,49525,49530,49544,49546,49548,49550,49555')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5019, 'GREENSBORO/WINSTON-SALEM', '28642,27425,27427,27416,27417,27419,27420,27429,27435,27438,27455,27495,27498,27405,27403,27404,27406,27407,27408,27409,27410,27411,27412,27413,27415,27351,27355,27358,27359,27360,27361,27370,27373,27374,27377,27401,27402,27292,27293,27282,27283,27284,27285,27253,27258,27260,27261,27262,27263,27264,27265,27294,27295,27298,27299,27301,27302,27310,27313,27316,27317,27340,27341,27342,27349,27350,27249,27235,27239,27244,27248,27205,27214,27215,27216,27217,27220,27230,27233,27199,27201,27202,27203,27204,27120,27127,27130,27150,27151,27155,27156,27157,27113,27114,27115,27116,27117,27104,27105,27106,27107,27108,27109,27110,27111,27055,27094,27098,27099,27101,27102,27103,27053,27046,27050,27051,27052,27012,27010,27011,27006,27009,27014,27016,27018,27019,27020,27021,27022,27023,27028,27040,27042,27045')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5020, 'GREENVILLE, SC', '29690,29697,29698,29702,29680,29681,29682,29683,29685,29687,29688,29689,29652,29654,29655,29656,29671,29684,29657,29661,29662,29667,29669,29670,29673,29677,29641,29601,29602,29603,29604,29605,29606,29607,29608,29609,29610,29611,29612,29614,29615,29616,29617,29621,29624,29640,29622,29623,29627,29630,29631,29633,29635,29636,29642,29644,29650,29651,29301,29302,29303,29304,29305,29306,29307,29316,29365,29625,29634,29318,29319,29320,29322,29323,29324,29329,29330,29331,29333,29334,29335,29336,29338,29340,29341,29342,29349,29368,29346,29348,29356,29369,29372,29373,29374,29375,29376,29377,29378,29385,29386,29388,29390,29391,29613,29626,29632')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5021, 'HAMILTON-MIDDLETOWN OH', '45099,45069,45071,45073,45067,45064,45055,45053,45056,45061,45062,45063,45050,45043,45044,45042,45026,45023,45025,45011,45012,45013,45014,45015,45018,45020,45004')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5022, 'HARRISBURG, PA', '17324,17001,17003,17005,17006,17007,17008,17010,17011,17012,17013,17016,17017,17018,17020,17023,17024,17025,17026,17027,17028,17030,17031,17032,17033,17034,17036,17037,17038,17039,17040,17041,17042,17043,17045,17046,17047,17048,17050,17053,17055,17057,17061,17062,17064,17065,17067,17068,17069,17070,17071,17072,17073,17074,17077,17078,17080,17081,17083,17085,17088,17089,17090,17091,17093,17097,17098,17101,17102,17103,17104,17105,17106,17107,17108,17109,17110,17111,17112,17113,17120,17121,17122,17123,17124,17125,17126,17127,17128,17129,17130,17140,17177,17240,17241,17257,17266')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5023, 'HARTFORD CT', '06001,06002,06006,06010,06011,06013,06016,06019,06020,06022,06023,06025,06026,06028,06029,06030,06032,06033,06034,06035,06037,06040,06041,06043,06045,06049,06050,06051,06052,06053,06057,06059,06060,06061,06062,06063,06064,06066,06067,06070,06071,06072,06073,06074,06075,06076,06077,06078,06080,06081,06082,06083,06084,06085,06087,06088,06089,06090,06092,06093,06094,06095,06096,06098,06101,06102,06103,06104,06105,06106,06107,06108,06109,06110,06111,06112,06114,06115,06117,06118,06119,06120,06123,06126,06127,06128,06129,06131,06132,06133,06134,06137,06138,06140,06141,06142,06143,06144,06145,06146,06147,06150,06151,06152,06153,06154,06155,06156,06160,06161,06786,06791,06781,06782,06489,06481,06479,06480,06474,06469,06467,06457,06459,06438,06441,06444,06447,06455,06456,06424,06422,06423,06416,06414,06415,06279,06280,06266,06268,06269,06278,06176,06180,06183,06199,06226,06231,06232,06235,06237,06238,06248,06249,06250,06251,06256,06265')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5024, 'HONOLULU HI', '96701,96706,96707,96709,96712,96717,96730,96731,96734,96744,96759,96762,96782,96786,96789,96791,96792,96795,96797,96801,96802,96803,96804,96805,96806,96807,96808,96809,96810,96811,96812,96813,96814,96815,96816,96817,96818,96819,96820,96821,96822,96823,96824,96825,96826,96827,96828,96830,96835,96836,96837,96838,96839,96840,96841,96842,96843,96844,96845,96846,96847,96848,96849,96850,96853,96854,96857,96858,96859,96860,96861,96862,96863,96898')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5025, 'INDIANAPOLIS IN', '46298,46290,46291,46295,46296,46274,46275,46277,46278,46280,46282,46283,46285,47234,46001,46011,46012,46013,46014,46015,46016,46017,46018,46030,46031,46032,46033,46034,46036,46038,46040,46044,46048,46051,46052,46055,46056,46060,46061,46063,46064,46069,46070,46071,46074,46075,46077,46082,46102,46103,46106,46107,46110,46111,46112,46113,46117,46118,46121,46122,46123,46124,46125,46126,46129,46130,46131,46140,46142,46143,46144,46147,46149,46151,46154,46157,46158,46161,46162,46163,46164,46165,46166,46167,46168,46176,46180,46181,46182,46183,46184,46186,46201,46202,46203,46204,46205,46206,46207,46208,46209,46211,46214,46216,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46234,46235,46236,46237,46239,46240,46241,46242,46244,46247,46249,46250,46251,46253,46254,46255,46256,46259,46260,46266,46268')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5026, 'JACKSONVILLE FL', '32003,32004,32009,32011,32030,32033,32034,32035,32041,32043,32046,32050,32065,32099,32086,32092,32095,32097,32067,32068,32073,32079,32080,32082,32084,32085,32246,32247,32250,32254,32255,32256,32257,32258,32259,32260,32266,32267,32276,32277,32290,32656,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32145,32211,32212,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32244,32245')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5027, 'JAMESTOWN NY', '14701,14702,14703,14704,14710,14712,14716,14718,14720,14722,14723,14724,14728,14732,14733,14736,14738,14740,14742,14747,14750,14752,14756,14757,14758,14767,14769,14775,14781,14782,14784,14785,14787,14048,14062,14063,14135,14136,14138,14166')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5028, 'KANSAS CITY MO-KS', '66285,66286,66007,66012,66013,66018,66019,66020,66021,66025,66026,66027,66030,66031,66036,66043,66048,66051,66052,66053,66061,66062,66063,66064,66071,66083,66085,66086,66101,66102,66103,66104,66105,66106,66109,66110,66111,66112,66113,66115,66117,66118,66119,66160,66201,66202,66203,66204,66205,66206,66207,66208,66209,66210,66211,66212,66213,66214,66215,66216,66217,66218,66219,66220,66221,66222,66223,66224,66225,66226,66227,66250,66251,66276,66282,66283,64001,64011,64012,64013,64014,64015,64016,64017,64018,64020,64021,64022,64024,64028,64029,64030,64034,64035,64036,64037,64048,64050,64051,64052,64053,64054,64055,64056,64057,64058,64060,64062,64063,64064,64065,64066,64067,64068,64069,64070,64071,64072,64073,64074,64075,64076,64077,64078,64079,64080,64081,64082,64083,64084,64085,64086,64087,64088,64089,64090,64092,64096,64097,64098,64101,64102,64105,64106,64108,64109,64110,64111,64112,64113,64114,64116,64117,64118,64119,64120,64121,64123,64124,64125,64126,64127,64128,64129,64130,64131,64132,64133,64134,64136,64137,64138,64139,64141,64144,64145,64146,64147,64148,64149,64150,64151,64152,64153,64154,64155,64156,64157,64158,64160,64161,64163,64164,64165,64166,64167,64168,64170,64171,64172,64179,64180,64184,64185,64187,64188,64190,64191,64192,64193,64194,64195,64196,64197,64198,64199,64429,64439,64444,64454,64465,64477,64490,64492,64493,64701,64725,64734,64739,64742,64743,64746,64747,64944,64999')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5029, 'LAKELAND-WINTER HAVEN FL', '33801,33802,33803,33804,33805,33806,33807,33809,33810,33811,33813,33815,33820,33823,33827,33830,33831,33835,33836,33837,33838,33839,33840,33841,33843,33844,33845,33846,33847,33849,33850,33851,33853,33854,33855,33856,33858,33859,33860,33863,33867,33868,33877,33880,33881,33882,33883,33884,33885,33888,33897,33898,34759')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5030, 'LAS VEGAS NV-AZ', '86437,86438,86439,86440,86441,86442,86443,86444,86445,86446,85360,86021,86401,86402,86403,86404,86405,86406,86411,86412,86413,86426,86427,86429,86430,86431,86432,86433,86434,86436,88901,89155,89156,89159,89160,89162,89163,89164,89170,89173,89177,89180,89185,89191,89193,89199,89409,89121,89122,89123,89124,89125,89126,89127,89128,89129,89130,89131,89132,89133,89134,89135,89137,89138,89139,89141,89142,89143,89144,89145,89146,89147,89148,89149,89150,89151,89152,89153,89154,88905,89003,89004,89005,89006,89007,89009,89011,89012,89014,89015,89016,89018,89019,89020,89021,89022,89023,89024,89025,89026,89027,89028,89029,89030,89031,89032,89033,89036,89039,89040,89041,89045,89046,89048,89049,89052,89053,89060,89061,89070,89074,89077,89084,89086,89101,89102,89103,89104,89106,89107,89108,89109,89110,89111,89112,89113,89114,89115,89116,89117,89118,89119,89120')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5031, 'LOS ANGELES-LONG BEACH CA', '93510,93532,93534,93535,93536,93539,93543,93544,93550,93551,93552,93553,93563,93584,93586,93590,93591,93599,90001,90002,90003,90004,90005,90006,90007,90008,90009,90010,90011,90012,90013,90014,90015,90016,90017,90018,90019,90020,90021,90022,90023,90024,90025,90026,90027,90028,90029,90030,90031,90032,90033,90034,90035,90036,90037,90038,90039,90040,90041,90042,90043,90044,90045,90046,90047,90048,90049,90050,90051,90052,90053,90054,90055,90056,90057,90058,90059,90060,90061,90062,90063,90064,90065,90066,90067,90068,90069,90070,90071,90072,90073,90074,90075,90076,90077,90078,90079,90080,90081,90082,90083,90084,90086,90087,90088,90089,90091,90093,90094,90095,90096,90101,90102,90103,90174,90185,90189,90201,90202,90209,90210,90211,90212,90213,90220,90221,90222,90223,90224,90230,90231,90232,90233,90239,90240,90241,90242,90245,90247,90248,90249,90250,90251,90254,90255,90260,90261,90262,90263,90264,90265,90266,90267,90270,90272,90274,90275,90277,90278,90280,90290,90291,90292,90293,90294,90295,90296,90301,90302,90303,90304,90305,90306,90307,90308,90309,90310,90311,90312,90313,90397,90398,90401,90402,90403,90404,90405,90406,90407,90408,90409,90410,90411,90501,90502,90503,90504,90505,90506,90507,90508,90509,90510,90601,90602,90603,90604,90605,90606,90607,90608,90609,90610,90633,90637,90638,90639,90640,90650,90651,90652,90659,90660,90661,90662,90665,90670,90701,90702,90703,90704,90706,90707,90710,90711,90712,90713,90714,90715,90716,90717,90723,90731,90732,90733,90734,90744,90745,90746,90747,90748,90749,90801,90802,90803,90804,90805,90806,90807,90808,90809,90810,90813,90814,90815,90822,90831,90832,90833,90834,90835,90840,90842,90844,90845,90846,90847,90848,90853,90888,90899,91001,91003,91006,91007,91009,91010,91011,91012,91016,91017,91020,91021,91023,91024,91025,91030,91031,91040,91041,91042,91043,91046,91050,91051,91066,91077,91101,91102,91103,91104,91105,91106,91107,91108,91109,91110,91114,91115,91116,91117,91118,91121,91123,91124,91125,91126,91129,91131,91175,91182,91184,91185,91186,91187,91188,91189,91191,91201,91202,91203,91204,91205,91206,91207,91208,91209,91210,91214,91221,91222,91224,91225,91226,91301,91302,91303,91304,91305,91306,91307,91308,91309,91310,91311,91312,91313,91316,91321,91322,91324,91325,91326,91327,91328,91329,91330,91331,91333,91334,91335,91337,91340,91341,91342,91343,91344,91345,91346,91350,91351,91352,91353,91354,91355,91356,91357,91363,91364,91365,91367,91371,91372,91376,91380,91381,91383,91384,91385,91386,91387,91388,91390,91392,91393,91394,91395,91396,91399,91401,91402,91403,91404,91405,91406,91407,91408,91409,91410,91411,91412,91413,91416,91423,91426,91436,91470,91482,91495,91496,91497,91499,91501,91502,91503,91504,91505,91506,91507,91508,91510,91521,91522,91523,91526,91601,91602,91603,91604,91605,91606,91607,91608,91609,91610,91611,91612,91614,91615,91616,91617,91618,91702,91706,91711,91715,91716,91722,91723,91724,91731,91732,91733,91734,91735,91740,91741,91744,91745,91746,91747,91748,91749,91750,91754,91755,91756,91765,91766,91767,91768,91769,91770,91771,91772,91773,91775,91776,91778,91780,91788,91789,91790,91791,91792,91793,91795,91801,91802,91803,91804,91896')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5032, 'LOUISVILLE KY-IN', '40299,40297,40298,40290,40291,40292,40296,40010,40014,40018,40023,40025,40026,40027,40031,40032,40041,40047,40055,40056,40059,40077,40109,40110,40118,40129,40150,40165,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40228,40229,40231,40232,40233,40241,40242,40243,40245,40250,40251,40252,40253,40255,40256,40257,40258,40259,40261,40266,40268,40269,40270,40272,40280,40281,40282,40283,40285,40289,47199,47161,47162,47163,47164,47166,47170,47172,47177,47124,47126,47129,47130,47131,47135,47136,47138,47141,47142,47143,47146,47147,47150,47151,47160,47102,47104,47106,47107,47110,47111,47112,47114,47115,47117,47119,47122')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5033, 'MEMPHIS TN-AR-MS', '38680,38654,38641,38671,38651,38632,38672,38637,72395,38195,38197,38188,38190,38193,38194,38175,38177,38181,38182,38183,38184,38186,38187,37501,38002,38004,38010,38011,38014,38015,38016,38017,38018,38019,38023,38027,38028,38029,38036,38045,38046,38048,38049,38053,38054,38055,38057,38058,38060,38066,38068,38071,38076,38083,38088,38101,38103,38104,38105,38106,38107,38108,38109,38111,38112,38113,38114,38115,38116,38117,38118,38119,38120,38122,38124,38125,38126,38127,38128,38130,38131,38132,38133,38134,38135,38136,38137,38138,38139,38141,38142,38145,38146,38147,38148,38151,38152,38157,38159,38161,38163,38165,38166,38167,38168,38173,38174,72301,72303,72325,72327,72331,72332,72339,72364,72376,72384')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5034, 'MIAMI FL', '33299,33283,33296,33265,33266,33269,33280,33242,33243,33245,33247,33255,33256,33257,33261,33168,33169,33170,33172,33173,33174,33175,33176,33177,33178,33179,33180,33181,33182,33183,33184,33185,33186,33187,33189,33190,33193,33194,33195,33196,33197,33199,33231,33233,33234,33238,33239,33090,33092,33101,33102,33107,33109,33110,33111,33112,33114,33116,33119,33121,33122,33124,33125,33126,33127,33128,33129,33130,33131,33132,33133,33134,33135,33136,33137,33138,33139,33140,33141,33142,33143,33144,33145,33146,33147,33148,33149,33150,33151,33152,33153,33154,33155,33156,33157,33158,33159,33160,33161,33162,33163,33164,33165,33166,33167,33056,33054,33055,33033,33034,33035,33039,33030,33031,33032,33017,33018,33010,33011,33012,33013,33014,33015,33016,33002,00043')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5035, 'MIDDLESEX-SOMERSET, NJ', '08989,08902,08903,08904,08905,08906,08922,08933,08988,08809,08810,08812,08816,08817,08818,08820,08821,08822,08823,08824,08825,08826,08827,08828,08829,08830,08831,08832,08833,08834,08835,08836,08837,08840,08844,08846,08848,08850,08852,08853,08854,08855,08857,08858,08859,08861,08862,08863,08867,08868,08869,08870,08871,08872,08873,08875,08876,08877,08878,08879,08880,08882,08884,08885,08887,08888,08889,08890,08896,08899,08901,07069,07064,07067,07077,07080,07095,07059,07830,07831,07920,07921,07924,07931,07934,07938,07939,07977,07978,07979,08502,08504,08512,08528,08530,08536,08551,08553,08556,08557,08558,08559,08570,08801,08802,08803,08804,08805,08807,07001,07008')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5036, 'MINNEAPOLIS-ST. PAUL MN-WI', '54002,54003,54007,54010,54011,54012,54013,54014,54015,54016,54017,54021,54022,54023,54025,54027,54028,54082,54723,54740,54750,54761,54767,55001,55002,55003,55005,55008,55010,55011,55012,55013,55014,55016,55017,55020,55024,55025,55029,55031,55032,55033,55038,55040,55042,55043,55044,55045,55047,55054,55055,55056,55065,55068,55069,55070,55071,55073,55074,55075,55076,55077,55078,55079,55080,55082,55083,55084,55085,55090,55092,55101,55102,55103,55104,55105,55106,55107,55108,55109,55110,55111,55112,55113,55114,55115,55116,55117,55118,55119,55120,55121,55122,55123,55124,55125,55126,55127,56071,56304,55585,55586,55587,55588,55589,55590,55591,55592,55593,55594,55595,55596,55597,55598,55599,56011,55437,55438,55439,55440,55441,55442,55443,55444,55445,55446,55447,55448,55449,55450,55454,55455,55458,55459,55460,55470,55472,55474,55479,55480,55483,55484,55485,55486,55487,55488,55550,55551,55552,55553,55554,55556,55557,55558,55559,55560,55561,55562,55563,55564,55565,55566,55567,55568,55569,55570,55571,55572,55573,55574,55575,55576,55577,55578,55579,55580,55581,55582,55583,55584,55128,55129,55133,55144,55146,55150,55155,55161,55164,55165,55166,55168,55169,55170,55172,55175,55177,55182,55187,55188,55190,55191,55301,55302,55303,55304,55305,55306,55308,55309,55311,55313,55315,55316,55317,55318,55319,55321,55322,55323,55327,55328,55330,55331,55337,55339,55340,55341,55343,55344,55345,55346,55347,55348,55349,55352,55356,55357,55358,55359,55360,55361,55362,55363,55364,55365,55367,55368,55369,55372,55373,55374,55375,55376,55377,55378,55379,55380,55382,55383,55384,55386,55387,55388,55390,55391,55392,55393,55394,55397,55398,55399,55401,55402,55403,55404,55405,55406,55407,55408,55409,55410,55411,55412,55413,55414,55415,55416,55417,55418,55419,55420,55421,55422,55423,55424,55425,55426,55427,55428,55429,55430,55431,55432,55433,55434,55435,55436')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5037, 'MONMOUTH-OCEAN NJ', '08759,08751,08752,08753,08754,08755,08756,08757,08758,08722,08723,08724,08730,08731,08732,08733,08734,08735,08736,08738,08739,08740,08741,08742,08750,08701,08720,08721,08555,08533,08535,08526,08527,08514,08510,08501,08087,08092,08005,08006,08008,08050,07701,07702,07703,07704,07709,07710,07711,07712,07715,07716,07717,07718,07719,07720,07721,07722,07723,07724,07726,07727,07728,07730,07731,07732,07733,07734,07735,07737,07738,07739,07740,07746,07747,07748,07750,07751,07752,07753,07754,07755,07756,07757,07758,07760,07762,07763,07764,07765,07777,07799')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5038, 'NASHVILLE TN', '37247,37248,37249,37250,37239,37240,37241,37242,37243,37244,37245,37246,37202,37203,37204,37205,37206,37207,37208,37209,37210,37211,37212,37213,37214,37215,37216,37217,37218,37219,37220,37221,37222,37224,37227,37228,37229,37230,37232,37234,37235,37236,37237,37238,37010,37011,37013,37014,37015,37016,37020,37022,37024,37027,37029,37031,37032,37035,37036,37037,37046,37048,37049,37051,37055,37056,37060,37062,37063,37064,37065,37066,37067,37068,37069,37070,37071,37072,37073,37075,37076,37077,37080,37082,37085,37086,37087,37088,37089,37090,37115,37116,37118,37119,37121,37122,37127,37128,37129,37130,37131,37132,37133,37135,37136,37138,37141,37143,37146,37148,37149,37152,37153,37165,37167,37172,37179,37181,37184,37186,37187,37188,37189,37201')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5039, 'NASSAU-SUFFOLK NY', '11796,11797,11798,11801,11802,11803,11804,11815,11819,11854,11855,11901,11930,11931,11932,11933,11934,11935,11937,11939,11940,11941,11942,11944,11946,11947,11948,11949,11950,11951,11952,11953,11954,11955,11956,11957,11958,11959,11960,11961,11962,11963,11964,11965,11967,11968,11969,11970,11971,11972,11973,11975,11976,11977,11978,11980,11552,11553,11554,11555,11556,11557,11558,11559,11560,11561,11563,11564,11565,11566,11568,11569,11570,11571,11572,11575,11576,11577,11579,11580,11581,11582,11583,11588,11590,11592,11593,11594,11595,11596,11597,11598,11599,11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11713,11714,11715,11716,11717,11718,11719,11720,11721,11722,11724,11725,11726,11727,11729,11730,11731,11732,11733,11735,11736,11737,11738,11739,11740,11741,11742,11743,11745,11746,11747,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11760,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776,11777,11778,11779,11780,11782,11783,11784,11786,11787,11788,11789,11790,11791,11792,11793,11794,11795,00501,00544,06390,11001,11002,11003,11010,11020,11021,11022,11023,11024,11026,11030,11040,11041,11042,11043,11050,11051,11052,11053,11054,11055,11096,11501,11507,11509,11510,11514,11516,11518,11520,11530,11531,11535,11536,11542,11545,11547,11548,11549,11550,11551')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5040, 'NEW ORLEANS LA', '70723,70743,70763,70792,70435,70437,70445,70447,70448,70452,70457,70458,70459,70460,70461,70463,70464,70469,70470,70471,70159,70160,70161,70162,70163,70164,70165,70166,70167,70170,70172,70174,70175,70176,70177,70178,70179,70181,70182,70183,70184,70185,70186,70187,70189,70190,70195,70358,70420,70431,70433,70434,00121,00122,70001,70002,70003,70004,70005,70006,70009,70010,70011,70030,70031,70032,70033,70036,70037,70038,70039,70040,70041,70042,70043,70044,70046,70047,70049,70050,70051,70052,70053,70054,70055,70056,70057,70058,70059,70060,70062,70063,70064,70065,70066,70067,70068,70069,70070,70071,70072,70073,70075,70076,70078,70079,70080,70081,70082,70083,70084,70085,70086,70087,70090,70091,70092,70094,70096,70112,70113,70114,70115,70116,70117,70118,70119,70121,70122,70123,70124,70125,70126,70127,70128,70129,70130,70131,70139,70140,70141,70142,70143,70145,70146,70148,70149,70150,70151,70152,70153,70154,70156,70157,70158')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5041, 'NEW YORK NY', '11499,11436,11439,11451,11484,11428,11429,11430,11431,11432,11433,11434,11435,11370,11371,11372,11373,11374,11375,11377,11378,11379,11380,11381,11385,11386,11390,11405,11411,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425,11426,11427,11204,11205,11206,11207,11208,11209,11210,11211,11212,11213,11214,11215,11216,11217,11218,11219,11220,11221,11222,11223,11224,11225,11226,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241,11242,11243,11245,11247,11248,11249,11251,11252,11256,11351,11352,11354,11355,11356,11357,11358,11359,11360,11361,11362,11363,11364,11365,11366,11367,11368,11369,11101,11102,11103,11104,11105,11106,11109,11120,11201,11202,11203,11004,11005,10994,10984,10986,10989,10993,10968,10970,10974,10976,10977,10980,10982,10983,10804,10805,10901,10911,10913,10920,10923,10927,10931,10952,10954,10956,10960,10962,10964,10965,10536,10537,10538,10540,10541,10542,10543,10545,10546,10547,10548,10549,10550,10551,10552,10553,10557,10558,10560,10562,10566,10567,10570,10571,10572,10573,10576,10577,10578,10579,10580,10583,10587,10588,10589,10590,10591,10594,10595,10596,10597,10598,10601,10602,10603,10604,10605,10606,10607,10610,10650,10701,10702,10703,10704,10705,10706,10707,10708,10709,10710,10801,10802,10803,10001,10002,10003,10004,10005,10006,10007,00083,10008,10009,10010,10011,10012,10013,10014,10016,10017,10018,10019,10020,10021,10022,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033,10034,10035,10036,10037,10038,10039,10040,10041,10043,10044,10045,10047,10048,10055,10069,10072,10080,10081,10082,10087,10095,10098,10101,10102,10103,10104,10105,10106,10107,10108,10109,10110,10111,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125,10126,10128,10129,10131,10132,10133,10138,10149,10150,10151,10152,10153,10154,10155,10156,10157,10158,10159,10160,10161,10162,10163,10164,10165,10166,10167,10168,10169,10170,10171,10172,10173,10174,10175,10176,10177,10178,10179,10185,10197,10199,10211,10213,10242,10249,10256,10259,10260,10261,10265,10268,10269,10270,10271,10272,10273,10274,10275,10276,10277,10278,10279,10280,10281,10282,10285,10286,10292,10301,10302,10303,10304,10305,10306,10307,10308,10309,10310,10311,10312,10313,10314,10451,10452,10453,10454,10455,10456,10457,10458,10459,10460,10461,10462,10463,10464,10465,10466,10467,10468,10469,10470,10471,10472,10473,10474,10475,10499,10501,10502,10503,10504,10505,10506,10507,10509,10510,10511,10512,10514,10516,10517,10518,10519,10520,10521,10522,10523,10524,10526,10527,10528,10530,10532,10533,10535,11693,11694,11695,11697,11690,11691,11692,12563')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5042, 'NEWARK NJ', '07009,07006,07007,07003,07004,07005,07016,07017,07801,07802,07803,07806,07820,07821,07822,07823,07060,07058,07054,07051,07052,07040,07041,07042,07043,07044,07045,07046,07050,07033,07027,07028,07034,07035,07036,07039,07023,07021,07018,07019,07092,07090,07091,07101,07102,07103,07104,07079,07078,07081,07082,07083,07088,07068,07065,07066,07063,07061,07062,07076,07460,07461,07462,07457,07444,07438,07439,07440,07428,07422,07419,07418,07416,07405,07207,07208,07203,07204,07205,07206,07193,07194,07195,07197,07198,07199,07201,07202,07105,07106,07107,07108,07109,07110,07111,07112,07114,07175,07182,07184,07188,07189,07191,07192,07980,07981,07983,07999,07976,07962,07963,07970,07974,07940,07945,07946,07950,07960,07961,07933,07935,07936,07932,07928,07930,07922,07926,07927,07901,07902,07865,07866,07869,07870,07871,07874,07875,07876,07877,07878,07879,07880,07881,07882,07885,07890,07832,07829,07825,07826,07827,07828,07833,07834,07836,07837,07838,07839,07840,07842,07843,07844,07845,07846,07847,07848,07849,07850,07851,07852,07853,07855,07856,07857,07860,07863,08808,08886,08865')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5043, 'NORFOLK-VIRGINIA BEACH VA', '27950,27956,27958,27964,27916,27917,27923,27927,27929,27939,27941,27947,27965,27966,23001,23003,23017,23018,23021,23025,23035,23898,23603,23604,23605,23606,23607,23608,23609,23612,23628,23630,23631,23651,23653,23602,23551,23601,23523,23529,23530,23541,23513,23514,23515,23517,23518,23519,23520,23521,23661,23663,23664,23665,23666,23667,23668,23669,23670,23681,23690,23691,23692,23693,23694,23696,23701,23702,23703,23704,23705,23707,23708,23709,23866,23509,23510,23511,23512,23501,23502,23503,23504,23505,23506,23507,23508,23458,23459,23460,23461,23462,23463,23464,23465,23466,23467,23471,23479,23487,23323,23324,23325,23326,23327,23328,23397,23424,23430,23431,23432,23433,23434,23435,23436,23437,23438,23439,23450,23451,23452,23454,23455,23456,23457,23045,23050,23056,23061,23062,23064,23066,23068,23072,23076,23081,23090,23107,23109,23119,23125,23127,23128,23130,23131,23138,23149,23154,23155,23163,23168,23178,23183,23184,23185,23186,23187,23188,23190,23191,23304,23314,23315,23320,23321,23322')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5044, 'OAKLAND CA', '94501,94502,94506,94507,94509,94511,94513,94514,94516,94517,94518,94519,94520,94521,94522,94523,94524,94525,94526,94527,94528,94529,94530,94531,94536,94537,94538,94539,94540,94541,94542,94543,94544,94545,94546,94547,94548,94549,94550,94551,94552,94553,94555,94556,94557,94560,94561,94563,94564,94565,94566,94568,94569,94570,94572,94575,94577,94578,94579,94580,94583,94586,94587,94588,94595,94596,94597,94598,94601,94602,94603,94604,94605,94606,94607,94608,94609,94610,94611,94612,94613,94614,94615,94617,94618,94619,94620,94621,94622,94623,94624,94625,94626,94643,94649,94659,94660,94661,94662,94666,94701,94702,94703,94704,94705,94706,94707,94708,94709,94710,94712,94720,94801,94802,94803,94804,94805,94806,94807,94808,94820,94850,95391')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5045, 'OKLAHOMA CITY OK', '74873,74878,73189,73194,73195,73196,73198,74801,74802,74804,74826,74831,74840,74851,74852,74854,74857,74866,73108,73109,73110,73111,73112,73113,73114,73115,73116,73117,73118,73119,73120,73121,73122,73123,73124,73125,73126,73127,73128,73129,73130,73131,73132,73134,73135,73136,73137,73139,73140,73141,73142,73143,73144,73145,73146,73147,73148,73149,73150,73151,73152,73153,73154,73155,73156,73157,73159,73160,73162,73164,73165,73167,73169,73170,73172,73173,73177,73178,73179,73180,73184,73185,73003,73007,73008,73010,73013,73014,73019,73020,73022,73026,73027,73028,73031,73034,73036,73044,73045,73049,73050,73051,73054,73056,73058,73063,73064,73065,73066,73068,73069,73070,73071,73072,73073,73078,73080,73083,73084,73085,73090,73093,73095,73097,73099,73101,73102,73103,73104,73105,73106,73107')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5046, 'ORANGE COUNTY CA', '92841,92842,92843,92844,92845,92846,92850,92856,92857,92859,92861,92862,92863,92864,92865,92866,92867,92868,92869,92870,92871,92885,92886,92887,92899,92602,92603,92604,92605,92606,92607,92609,92610,92612,92614,92615,92616,92618,92619,92620,92623,92624,92625,92626,92627,92628,92629,92630,92637,92646,92647,92648,92649,92650,92651,92652,92653,92654,92655,92656,92657,92658,92659,92660,92661,92662,92663,92672,92673,92674,92675,92676,92677,92678,92679,92683,92684,92685,92688,92690,92691,92692,92693,92694,92697,92698,92701,92702,92703,92704,92705,92706,92707,92708,92711,92712,92728,92735,92780,92781,92782,92799,92801,92802,92803,92804,92805,92806,92807,92808,92809,92811,92812,92814,92815,92816,92817,92821,92822,92823,92825,92831,92832,92833,92834,92835,92836,92837,92838,92840,90743,90740,90742,90721,90720,90680,90631,90632,90620,90621,90622,90623,90624,90630')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5047, 'ORLANDO FL', '32898,32890,32891,32893,32897,32868,32869,32872,32877,32878,32885,32886,32887,32773,32771,32772,32776,32777,32778,32779,32784,32789,32790,32791,32792,32793,32794,32795,32798,32799,32801,32802,32803,32804,32805,32806,32807,32808,32809,32810,32811,32812,32814,32816,32817,32818,32819,32820,32821,32822,32824,32825,32826,32827,32828,32829,32830,32831,32832,32833,32834,32835,32836,32837,32839,32853,32854,32855,32856,32857,32858,32859,32860,32861,32862,32867,34760,34756,34758,34761,34762,34769,34770,34744,34745,34746,34747,34748,34749,34753,34755,34771,34772,34773,34777,34778,34786,34787,34788,34789,34797,33896,34705,34711,34712,34713,34729,34731,34734,34736,34737,34739,34740,34741,34742,34743,33848,32102,32159,32158,32714,32710,32712,32715,32716,32718,32719,32707,32708,32709,32701,32702,32703,32704,32762,32765,32766,32767,32768,32752,32756,32757,32746,32747,32750,32751,32736,32730,32732,32733,32735,32727,32726')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5048, 'PHILADELPHIA PA-NJ', '08505,08511,08515,08518,08554,08641,08640,08562,08093,08090,08091,08086,08088,08089,08094,08095,08096,08097,08098,08099,08101,08102,08103,08104,08105,08106,08107,08108,08109,08110,08224,08312,08318,08322,08328,08343,08344,08347,08052,08053,08054,08055,08056,08057,08059,08060,08061,08062,08063,08064,08065,08066,08067,08068,08069,08070,08071,08072,08073,08074,08075,08076,08077,08078,08079,08080,08081,08083,08084,08085,08001,08002,08003,08004,08007,08009,08010,08011,08012,08051,08048,08049,08042,08043,08045,08046,08032,08033,08034,08035,08036,08038,08039,08041,08014,08015,08016,08018,08019,08020,08021,08022,08023,08025,08026,08027,08028,08029,08030,08031,18039,18041,18054,18073,18074,18076,18077,18081,18084,18901,18923,18916,18917,18911,18912,18913,18915,18910,18914,18918,18920,18921,18922,18924,18925,18926,18927,18928,18929,18930,18931,18932,18933,18934,18935,18936,18938,18940,18942,18943,18944,18946,18947,18949,18950,18951,18953,18954,18955,18956,18957,18958,18960,18962,18963,18964,18966,18968,18969,18970,18971,18972,18974,18976,18977,18979,18980,18981,18991,19001,19002,19003,19004,19006,19007,19008,19009,19010,19012,19013,19014,19015,19016,19017,19018,19019,19020,19021,19022,19023,19025,19026,19027,19028,19029,19030,19031,19032,19033,19034,19035,19036,19037,19038,19039,19040,19041,19043,19044,19046,19047,19048,19049,19050,19052,19053,19054,19055,19056,19057,19058,19059,19061,19063,19064,19065,19066,19067,19070,19072,19073,19074,19075,19076,19078,19079,19080,19081,19082,19083,19085,19086,19087,19088,19089,19090,19091,19093,19094,19095,19096,19098,19101,19102,19103,19104,19105,19106,19107,19108,19109,19110,19111,19112,19113,19114,19115,19116,19118,19119,19120,19121,19122,19123,19124,19125,19126,19127,19128,19129,19130,19131,19132,19133,19134,19135,19136,19137,19138,19139,19140,19141,19142,19143,19144,19145,19146,19147,19148,19149,19150,19151,19152,19153,19154,19155,19160,19161,19162,19170,19171,19172,19173,19175,19177,19178,19181,19182,19184,19185,19187,19188,19191,19192,19193,19194,19196,19197,19244,19255,19301,19310,19311,19312,19316,19317,19318,19319,19320,19330,19331,19333,19335,19339,19341,19342,19343,19344,19345,19346,19347,19348,19350,19351,19352,19353,19354,19355,19357,19358,19360,19362,19363,19365,19366,19367,19369,19371,19372,19373,19374,19375,19376,19380,19381,19382,19383,19390,19395,19397,19398,19399,19401,19403,19404,19405,19406,19407,19408,19409,19415,19420,19421,19422,19423,19424,19425,19426,19428,19429,19430,19432,19435,19436,19437,19438,19440,19441,19442,19443,19444,19446,19450,19451,19453,19454,19455,19456,19457,19460,19462,19464,19465,19468,19470,19472,19473,19474,19475,19477,19478,19480,19481,19482,19483,19484,19485,19486,19487,19489,19490,19492,19493,19494,19495,19496,19520,19525')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5049, 'PHOENIX-MESA AZ', '85739,85390,85618,85623,85631,85378,85379,85380,85381,85382,85383,85385,85387,85358,85354,85355,85343,85345,85351,85353,85361,85363,85372,85373,85374,85375,85376,85377,85312,85313,85318,85320,85322,85323,85326,85327,85329,85331,85335,85337,85338,85339,85340,85342,85233,85234,85236,85237,85239,85241,85242,85244,85246,85247,85248,85249,85250,85251,85252,85253,85254,85255,85256,85257,85258,85259,85260,85261,85262,85263,85264,85266,85267,85268,85269,85271,85272,85273,85274,85275,85277,85278,85279,85280,85281,85282,85283,85284,85285,85287,85289,85290,85291,85292,85296,85297,85299,85301,85302,85303,85304,85305,85306,85307,85308,85309,85310,85311,00197,00199,85001,85002,85003,85004,85005,85006,85007,85008,85009,85010,85011,85012,85013,85014,85015,85016,85017,85018,85019,85020,85021,85022,85023,85024,85025,85026,85027,85028,85029,85030,85031,85032,85033,85034,85035,85036,85037,85038,85040,85041,85042,85043,85044,85045,85046,85048,85050,85051,85053,85054,85055,85060,85061,85062,85063,85064,85065,85066,85067,85068,85069,85070,85071,85072,85073,85074,85075,85076,85078,85079,85080,85082,85085,85086,85087,85098,85099,85201,85202,85203,85204,85205,85206,85207,85208,85210,85211,85212,85213,85214,85215,85216,85217,85218,85219,85220,85221,85222,85223,85224,85225,85226,85227,85228,85230,85231,85232')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5050, 'PITTSBURGH PA', '15006,15010,15003,15004,15009,16025,16027,16029,16030,16033,16034,16035,16037,16038,16039,16040,16041,16045,16046,16048,16049,16050,16051,16052,16053,16055,16056,16057,16059,16061,16063,16066,16115,16117,16123,16136,16373,15443,15444,15445,15446,15447,15448,15449,15450,15451,15454,15455,15456,15458,15459,15460,15461,15462,15463,15464,15465,15466,15467,15468,15469,15470,15472,15473,15474,15475,15476,15477,15478,15479,15480,15482,15483,15484,15486,15488,15489,15490,15492,15601,15605,15606,15610,15611,15612,15613,15615,15616,15617,15618,15619,15620,15621,15622,15623,15624,15625,15626,15627,15628,15629,15631,15632,15633,15634,15635,15636,15637,15638,15639,15640,15641,15642,15644,15646,15647,15650,15655,15656,15658,15660,15661,15662,15663,15664,15665,15666,15668,15670,15671,15672,15674,15675,15676,15677,15678,15679,15680,15683,15684,15685,15687,15688,15689,15690,15691,15692,15693,15695,15696,15697,15698,15779,15923,16001,16002,16003,16016,16017,16018,16020,16021,16022,16023,16024,15005,15012,15017,15018,15019,15020,15021,15022,15024,15025,15026,15027,15028,15030,15001,15007,15014,15015,15031,15032,15033,15034,15035,15036,15037,15038,15042,15043,15044,15045,15046,15047,15049,15050,15051,15052,15053,15054,15055,15056,15057,15059,15060,15061,15062,15063,15064,15065,15066,15067,15068,15069,15071,15072,15074,15075,15076,15077,15078,15081,15082,15083,15084,15085,15086,15087,15088,15089,15090,15091,15095,15096,15101,15102,15104,15106,15108,15110,15112,15116,15120,15122,15123,15126,15127,15129,15130,15131,15132,15133,15134,15135,15136,15137,15139,15140,15142,15143,15144,15145,15146,15147,15148,15201,15202,15203,15204,15205,15206,15207,15208,15209,15210,15211,15212,15213,15214,15215,15216,15217,15218,15219,15220,15221,15222,15223,15224,15225,15226,15227,15228,15229,15230,15231,15232,15233,15234,15235,15236,15237,15238,15239,15240,15241,15242,15243,15244,15250,15251,15252,15253,15254,15255,15257,15258,15259,15260,15261,15262,15263,15264,15265,15266,15267,15268,15270,15272,15274,15275,15276,15277,15278,15279,15281,15282,15283,15285,15286,15290,15295,15301,15311,15312,15313,15314,15317,15321,15322,15323,15324,15329,15330,15331,15332,15333,15336,15339,15340,15342,15345,15347,15350,15358,15360,15361,15363,15365,15366,15367,15368,15376,15377,15378,15379,15401,15410,15412,15413,15415,15416,15417,15419,15420,15421,15422,15423,15425,15427,15428,15429,15430,15431,15432,15433,15434,15435,15436,15437,15438,15439,15440,15442')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5051, 'PORTLAND-VANCOUVER OR-WA', '98601,98604,98606,98607,98622,98629,98642,98660,98661,98662,98663,98664,98665,98666,98667,98668,98671,98674,98675,98682,98683,98684,98685,98686,98687,00070,97004,97005,97006,97007,97008,97009,97010,97011,97013,97014,97015,97016,97017,97018,97019,97022,97023,97024,97027,97028,97030,97034,97035,97036,97038,97042,97045,97048,97049,97051,97053,97054,97055,97056,97060,97062,97064,97067,97068,97070,97075,97076,97077,97078,97080,97101,97106,97109,97299,97378,97293,97294,97296,97298,97280,97281,97282,97283,97286,97290,97291,97292,97111,97113,97114,97115,97116,97117,97119,97123,97124,97125,97127,97128,97132,97133,97140,97148,97201,97202,97203,97204,97205,97206,97207,97208,97209,97210,97211,97212,97213,97214,97215,97216,97217,97218,97219,97220,97221,97222,97223,97224,97225,97227,97228,97229,97230,97231,97232,97233,97236,97238,97240,97242,97251,97253,97254,97255,97256,97258,97266,97267,97268,97269,97271,97272')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5052, 'RACINE WI', '53490,53108,53126,53138,53139,53167,53177,53182,53185,53401,53402,53403,53404,53405,53406,53407,53408,53105')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5053, 'RICHMOND-PETERSBURG VA', '23039,23030,23015,23014,23005,23011,23297,23298,23288,23289,23290,23291,23292,23293,23294,23295,23261,23266,23269,23270,23272,23273,23274,23275,23276,23278,23279,23280,23282,23284,23285,23286,23219,23220,23221,23192,23218,23222,23223,23224,23225,23226,23227,23228,23229,23230,23231,23232,23233,23234,23235,23236,23237,23238,23240,23241,23242,23249,23250,23255,23260,23160,23153,23173,23150,23162,23139,23146,23147,23129,23124,23113,23114,23116,23112,23103,23111,23089,23101,23102,23075,23069,23067,23065,23063,23141,23120,23140,23058,23059,23060,23054,23047,23831,23805,23830,23841,23804,23834,23840,23822,23801,23806,23803,23836,23872,23860,23838,23850,23842,23832,23833,23894,23875,23885')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5054, 'RIVERSIDE-SAN BERNARDINO', '92599,92595,92596,92590,92591,92592,92593,92561,92562,92563,92564,92567,92570,92571,92572,92581,92582,92583,92584,92585,92586,92587,92589,92284,92285,92286,92292,92301,92304,92305,92307,92308,92309,92310,92311,92312,92313,92314,92315,92316,92317,92318,92320,92321,92322,92323,92324,92325,92326,92327,92329,92332,92333,92334,92335,92336,92337,92338,92339,92340,92341,92342,92345,92346,92347,92350,92352,92354,92356,92357,92358,92359,92363,92364,92365,92366,92368,92369,92371,92372,92373,92374,92375,92376,92377,92378,92382,92385,92386,92391,92392,92393,92394,92397,92398,92399,92401,92402,92403,92404,92405,92406,92407,92408,92410,92411,92412,92413,92414,92415,92418,92420,92423,92424,92427,92501,92502,92503,92504,92505,92506,92507,92508,92509,92513,92514,92515,92516,92517,92518,92519,92521,92522,92530,92531,92532,92536,92539,92543,92544,92545,92546,92548,92549,92551,92552,92553,92554,92555,92556,92557,92883,92879,92880,92881,92882,92877,92878,92860,93592,93562,91798,91784,91785,91786,91761,91762,91763,91764,92201,92202,92203,92210,92211,92220,92223,92225,92226,92230,92234,92235,92236,92239,92240,92241,92242,92252,92253,92254,92255,92256,92258,92260,92261,92262,92263,92264,92267,92268,92270,92274,92275,92276,92277,92278,92280,92282,91758,91759,91752,91743,91737,91739,91730,91729,91710,91708,91709,91701')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5055, 'ROCHESTER NY', '14846,14694,14664,14673,14683,14692,14646,14647,14649,14650,14651,14652,14653,14660,14618,14619,14620,14621,14622,14623,14624,14625,14626,14627,14638,14639,14642,14643,14644,14645,14504,14505,14506,14508,14510,14511,14513,14514,14515,14516,14517,14518,14519,14520,14522,14525,14526,14532,14533,14534,14537,14538,14539,14542,14543,14544,14545,14546,14547,14548,14551,14555,14556,14557,14558,14559,14560,14561,14563,14564,14568,14571,14580,14585,14586,14589,14590,14592,14602,14603,14604,14605,14606,14607,14608,14609,14610,14611,14612,14613,14614,14615,14616,14617,13146,13154,14005,14013,14020,14021,14036,14410,14143,14103,14125,14098,14058,14040,14054,14056,14411,14413,14414,14416,14420,14422,14423,14424,14425,14428,14429,14430,14432,14433,14435,14437,14443,14445,14449,14450,14452,14453,14454,14456,14461,14462,14463,14464,14466,14467,14468,14469,14470,14471,14472,14475,14476,14477,14479,14480,14481,14482,14485,14486,14487,14488,14489,14502')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5056, 'SAN ANTONIO TX', '78287,78288,78289,78291,78292,78293,78294,78295,78296,78297,78298,78299,78623,78638,78655,78670,78245,78246,78247,78248,78249,78250,78251,78252,78253,78254,78255,78256,78257,78258,78259,78260,78261,78263,78264,78265,78266,78268,78269,78270,78275,78278,78279,78280,78283,78284,78285,78286,78002,78015,78023,78054,78070,78073,78101,78108,78109,78112,78114,78115,78121,78123,78124,78130,78131,78132,78133,78135,78143,78147,78148,78150,78152,78154,78155,78156,78160,78161,78163,78201,78202,78203,78204,78205,78206,78207,78208,78209,78210,78211,78212,78213,78214,78215,78216,78217,78218,78219,78220,78221,78222,78223,78224,78225,78226,78227,78228,78229,78230,78231,78232,78233,78234,78235,78236,78237,78238,78239,78240,78241,78242,78243,78244')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5057, 'SAN DIEGO CA', '92198,92199,92187,92190,92191,92192,92193,92194,92195,92196,92167,92168,92169,92170,92171,92172,92173,92174,92175,92176,92177,92178,92179,92182,92184,92186,92088,92090,92091,92092,92093,92096,92101,92102,92103,92104,92105,92106,92107,92108,92109,92110,92111,92112,92113,92114,92115,92116,92117,92118,92119,92120,92121,92122,92123,92124,92126,92127,92128,92129,92130,92131,92132,92133,92134,92135,92136,92137,92138,92139,92140,92142,92143,92145,92147,92149,92150,92152,92153,92154,92155,92158,92159,92160,92161,92162,92163,92164,92165,92166,91901,91902,91903,91905,91906,91908,91909,91910,91911,91912,91913,91914,91915,91916,91917,91921,91931,91932,91933,91934,91935,91941,91942,91943,91944,91945,91946,91947,91948,91950,91951,91962,91963,91976,91977,91978,91979,91980,91987,92003,92004,92007,92008,92009,92013,92014,92018,92019,92020,92021,92022,92023,92024,92025,92026,92027,92028,92029,92030,92033,92036,92037,92038,92039,92040,92046,92049,92051,92052,92054,92055,92056,92057,92058,92059,92060,92061,92064,92065,92066,92067,92068,92069,92070,92071,92072,92074,92075,92078,92079,92082,92083,92084,92085,92086')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5058, 'SAN FRANCISCO CA', '94002,94003,94005,94010,94011,94012,94013,94014,94015,94016,94017,94018,94019,94020,94021,94025,94026,94027,94028,94029,94030,94031,94037,94038,94044,94045,94059,94060,94061,94062,94497,94402,94403,94404,94405,94406,94407,94408,94409,94151,94152,94155,94156,94159,94160,94161,94162,94163,94164,94165,94166,94167,94168,94169,94170,94172,94175,94177,94188,94401,94063,94064,94065,94066,94067,94070,94071,94074,94080,94083,94099,94101,94102,94103,94104,94105,94106,94107,94108,94109,94110,94111,94112,94114,94115,94116,94117,94118,94119,94120,94121,94122,94123,94124,94125,94126,94127,94128,94129,94130,94131,94132,94133,94134,94135,94136,94137,94138,94139,94140,94141,94142,94143,94144,94145,94146,94147,94150,94964,94965,94966,94970,94971,94973,94974,94976,94977,94978,94979,94998,94901,94903,94904,94912,94913,94914,94915,94920,94924,94925,94929,94930,94933,94937,94938,94939,94940,94941,94942,94945,94946,94947,94948,94949,94950,94956,94957,94960,94963')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5059, 'SAN JOSE CA', '95002,95008,95009,95011,95013,95014,95015,95020,95021,95026,95030,95031,95032,95033,95035,95036,95037,95038,95042,95044,95046,95050,95051,95052,95053,95054,95055,95056,95070,95071,95101,95196,95191,95192,95193,95194,95159,95160,95161,95164,95170,95172,95173,95190,95137,95138,95139,95140,95141,95142,95148,95150,95151,95152,95153,95154,95155,95156,95157,95158,95102,95103,95106,95108,95109,95110,95111,95112,95113,95114,95115,95116,95117,95118,95119,95120,95121,95122,95123,95124,95125,95126,95127,95128,95129,95130,95131,95132,95133,95134,95135,95136,94085,94086,94087,94088,94089,94090,94310,94308,94309,94304,94305,94306,94307,94301,94302,94303,94042,94043,94039,94040,94041,94035,94024,94022,94023')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5060, 'SANTA CRUZ-WATSONVILLE CA', '95077,95073,95076,95066,95067,95060,95061,95062,95063,95064,95065,95041,95017,95018,95019,95010,95006,95007,95001,95003,95005')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5061, 'SCRANTON, PA', '18768,18769,18773,18774,18707,18710,18705,18706,18711,18761,18762,18763,18764,18765,18766,18767,18708,18709,18641,18643,18651,18653,18654,18655,18656,18657,18660,18661,18690,18701,18702,18703,18601,18704,18519,18522,18577,18615,18505,18507,18508,18509,18510,18512,18514,18515,18602,18603,18611,18612,18617,18618,18621,18622,18625,18627,18629,18631,18634,18635,18640,18644,18471,18518,18642,18501,18502,18503,18504,18424,18433,18434,18440,18444,18447,18448,18452,18636,18256,18517,18246,18247,18249,18251,18403,18407,18410,18411,18414,18416,18419,18420,18201,18202,18219,18221,18222,18223,18224,18225,18234,18239,18243,17878,17888,17920,17927,17814,17815,17820,17839,17846,17858,17859')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5062, 'ST. LOUIS MO-IL', '63024,63039,63020,63021,63042,63040,63043,63047,63048,63025,63031,63060,63061,63010,63028,63033,63016,63006,63013,63015,63037,63032,63034,63044,63065,63066,63052,63057,63017,63045,63050,63068,63069,63070,63072,63073,63074,63077,63079,63080,63084,63088,63089,63090,63099,63101,63102,63103,63104,63105,63106,63107,63108,63109,63110,63111,63112,63113,63114,63115,63116,63117,63118,63119,63120,63121,63122,63123,63124,63125,63126,63127,63128,63129,63130,63131,63132,63133,63134,63135,63136,63137,63138,63139,63140,63141,63143,63144,63145,63146,63147,63150,63151,63155,63156,63157,63158,63160,63163,63164,63166,63167,63169,63171,63177,63178,63179,63180,63182,63188,63190,63195,63196,63197,63198,63199,63301,63302,63303,63304,63332,63338,63341,63342,63343,63344,63346,63056,63019,63041,63022,63038,63001,63012,63023,63055,63051,63053,63014,63049,63026,63005,63011,63389,63390,63383,63385,63386,63387,63347,63348,63349,63357,63362,63365,63366,63367,63369,63370,63373,63376,63377,63378,63379,63381,62298,62281,62282,62283,62285,62289,62293,62294,62295,62221,62222,62223,62224,62225,62226,62230,62231,62232,62234,62236,62239,62240,62243,62244,62245,62248,62249,62250,62252,62254,62255,62256,62257,62258,62260,62264,62265,62266,62269,62273,62279,62001,62002,62010,62012,62018,62021,62022,62024,62025,62026,62028,62030,62031,62034,62035,62037,62040,62046,62048,62052,62058,62059,62060,62061,62062,62067,62071,62074,62084,62087,62090,62095,62097,62201,62202,62203,62204,62205,62206,62207,62208,62215,62216,62218,62219,62220')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5063, 'TACOMA WA', '98558,98580,98493,98497,98498,98499,98443,98444,98445,98446,98447,98450,98455,98460,98464,98465,98466,98467,98471,98477,98481,98492,98303,98304,98321,98323,98327,98328,98329,98330,98332,98333,98335,98338,98344,98348,98349,98351,98352,98354,98360,98371,98372,98373,98374,98375,98385,98387,98388,98390,98394,98395,98396,98397,98401,98402,98403,98404,98405,98406,98407,98408,98409,98411,98412,98413,98415,98416,98418,98421,98422,98424,98430,98431,98433,98438,98439,98442')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5064, 'TAMPA-ST. PETERSBURG, FL', '33785,33786,33772,33773,33774,33760,33761,33762,33763,33764,33765,33766,33767,33769,33780,33781,33782,33784,34695,34697,34668,34673,34674,34677,34679,34680,34681,34682,34683,34690,34691,34698,34684,34685,34688,34689,34601,34602,34603,34604,34605,34606,34607,34608,34609,34610,34611,34613,34614,34636,34660,34667,34669,34639,34652,34653,34654,34655,34656,34661,33503,33508,33509,33510,33511,33523,33524,33525,33526,33527,33530,33534,33548,33549,33550,33537,33539,33540,33541,33543,33544,33547,33556,33558,33559,33564,33565,33566,33567,33568,33569,33570,33572,33602,33571,33573,33574,33576,33583,33584,33586,33587,33592,33593,33594,33595,33598,33601,33603,33604,33605,33606,33607,33608,33609,33610,33611,33612,33613,33614,33615,33616,33617,33618,33619,33620,33621,33622,33623,33624,33625,33626,33629,33630,33631,33633,33634,33635,33637,33647,33650,33651,33655,33660,33661,33662,33663,33664,33672,33673,33674,33675,33677,33679,33680,33681,33682,33684,33685,33686,33687,33688,33689,33690,33694,33697,33701,33702,33703,33704,33770,33771,33775,33776,33705,33706,33707,33708,33709,33710,33711,33712,33713,33714,33715,33716,33728,33729,33730,33731,33777,33778,33779,33732,33733,33734,33736,33737,33738,33740,33742,33743,33744,33747,33755,33756,33757,33758,33759')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5065, 'VISALIA-TULARE CA', '00026,93670,93615,93618,93647,93666,93201,93207,93208,93218,93219,93221,93223,93227,93235,93237,93244,93247,93256,93257,93258,93260,93261,93262,93265,93267,93270,93271,93272,93274,93275,93277,93278,93279,93286,93291,93292')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5066, 'WASHINGTON DC-MD-VA-WV', '20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20015,20016,20017,20018,20019,20020,20024,20026,20029,20030,20032,20033,20035,20036,20037,20038,20039,20040,20042,20043,20044,20045,20046,20047,20049,20050,20051,20052,20053,20055,20056,20057,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20071,20073,20074,20075,20076,20077,20080,20081,20088,20090,20091,20098,20201,20202,20203,20204,20208,20210,20211,20212,20213,20215,20216,20217,20218,20219,20220,20221,20222,20223,20224,20226,20227,20228,20229,20230,20232,20235,20237,20238,20239,20240,20241,20242,20244,20245,20250,20594,20597,20570,20571,20572,20573,20575,20576,20577,20578,20579,20580,20581,20585,20586,20590,20591,20593,20251,20254,20260,20261,20262,20265,20266,20268,20270,20277,20289,20299,20303,20306,20307,20314,20315,20317,20318,20319,20332,20336,20340,20370,20372,20373,20374,20375,20376,20380,20388,20390,20391,20392,20393,20394,20398,20401,20402,20403,20404,20405,20407,20408,20410,20411,20412,20413,20414,20415,20416,20418,20419,20420,20421,20422,20423,20424,20425,20426,20427,20428,20429,20431,20433,20434,20435,20436,20437,20439,20440,20441,20442,20444,20447,20451,20456,20460,20463,20469,20472,20500,20502,20503,20505,20506,20507,20508,20509,20510,20515,20520,20521,20522,20523,20524,20525,20526,20527,20530,20531,20532,20533,20534,20535,20536,20537,20538,20539,20540,20541,20542,20543,20544,20546,20547,20548,20549,20551,20552,20553,20554,20555,20557,20559,20560,20565,20566,20041,20069,20070,20101,20102,20103,20104,20105,20107,20108,20109,20110,20111,20112,20113,20115,20116,25446,25442,25443,25432,25438,25440,25441,25420,25421,25423,25425,25427,25428,25429,25430,25401,25402,25410,25413,25414,25419,22746,22741,22742,22701,22712,22713,22714,22718,22720,22724,22726,22728,22729,22733,22734,22735,22736,22737,22739,22404,22405,22406,22407,22408,22412,22430,22448,22451,22463,22471,22481,22485,22526,22534,22544,22545,22547,22553,22554,22555,22565,22610,22611,22620,22630,22639,22642,22643,22646,22649,22663,22180,22181,22182,22183,22184,22185,22191,22192,22193,22194,22195,22199,22201,22202,22203,22204,22205,22206,22207,22209,22210,22211,22213,22214,22215,22216,22217,22219,22222,22226,22227,22229,22230,22234,22240,22242,22243,22244,22245,22246,22301,22302,22303,22304,22305,22306,22307,22308,22309,22310,22311,22312,22313,22314,22315,22320,22331,22332,22333,22334,22336,22401,22402,22403,20117,20118,20119,20120,20121,20122,20124,20128,20129,20130,20131,20132,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20146,20147,20148,20149,20151,20152,20153,20155,20156,20158,20159,20160,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20175,20176,20177,20178,20180,20181,20182,20184,20185,20186,20187,20188,20190,20191,20192,20193,20194,20195,20196,20197,20198,20199,20206,20231,20301,20310,20330,20350,20406,20453,22003,22009,22015,22026,22027,22030,22031,22032,22033,22034,22035,22036,22037,22038,22039,22040,22041,22042,22043,22044,22046,22060,22066,22067,22079,22081,22082,22101,22102,22103,22106,22107,22108,22109,22116,22118,22119,22121,22122,22124,22125,22134,22135,22150,22151,22152,22153,22156,22158,22159,22160,22161,22172,21798,21790,21792,21793,21788,21780,21775,21777,21778,21770,21771,21773,21774,21769,21762,21754,21755,21757,21727,21718,21710,21714,21716,21717,21701,21702,21703,21704,21705,21709,20918,20997,20913,20914,20915,20916,20058,20207,20233,20389,20395,20409,20599,20601,20602,20603,20604,20607,20608,20610,20611,20612,20613,20615,20616,20617,20622,20623,20625,20629,20632,20637,20639,20640,20643,20712,20714,20715,20716,20717,20718,20719,20703,20704,20705,20706,20707,20708,20709,20710,20695,20689,20693,20677,20678,20685,20688,20645,20646,20657,20658,20661,20662,20675,20676,20792,20790,20791,20799,20812,20813,20814,20781,20782,20783,20784,20785,20787,20788,20775,20771,20772,20773,20774,20768,20769,20770,20762,20757,20754,20750,20752,20753,20742,20743,20744,20745,20746,20747,20748,20749,20732,20735,20736,20737,20738,20740,20741,20725,20726,20731,20722,20720,20721,20815,20816,20817,20818,20824,20825,20827,20830,20832,20833,20837,20838,20839,20841,20842,20847,20848,20849,20850,20851,20852,20853,20854,20855,20857,20859,20860,20861,20862,20866,20868,20871,20872,20874,20875,20876,20877,20878,20879,20880,20882,20883,20884,20885,20886,20889,20891,20892,20894,20895,20896,20898,20899,20901,20902,20903,20904,20905,20906,20907,20908,20910,20911,20912')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5067, 'WATERBURY CT', '06488,06487,06770,06779,06726,06749,06751,06762,06712,06716,06720,06721,06722,06723,06724,06725,06701,06702,06703,06704,06705,06706,06708,06710,06795,06787,06798')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5068, 'PALM BEACH-BOCA RATON FL', '33499,33497,33498,33482,33483,33484,33486,33487,33488,33493,33496,33444,33436,33437,33438,33439,33445,33446,33447,33448,33454,33458,33459,33460,33461,33462,33463,33464,33465,33466,33467,33468,33469,33470,33474,33476,33477,33478,33480,33481,33401,33402,33403,33404,33405,33406,33407,33408,33409,33410,33411,33412,33413,33414,33415,33416,33417,33418,33419,33420,33421,33422,33424,33425,33426,33427,33428,33429,33430,33431,33432,33433,33434,33435,00053')");
db_query("INSERT INTO {ef_ref_mma} VALUES (5069, 'YOLO CA', '94246,95605,95606,95937,95799,95899,95607,95612,95616,95617,95618,95627,95637,95653,95679,95691,95694,95695,95697,95698,95776,95798')");
// END OF ADDING MODULE eventfinder
// UPDATE for image
// Use variable for name of 'file_directory_path'. Need it for later; makes code more readable
$filesdir_name = variable_get('file_directory_path', 'files');
// New image module expects variable 'image_default_path' to be *relative* to directory indicated by variable 'file_directory_path'
// So we take it out and modify it appropriately
$new_image_default_path = variable_get('image_default_path', 'files/images/');
// The old image module included the 'file_directory_path' as a prefix to the 'image_default_path'
// For example, if 'file_directory_path' == 'files', then 'image_default_path' would be 'files/images/', assuming
// 'images' was the subdirectory for images. We want to strip 'files/' (or whatever is the current 'file_directory_path'
// from the variable for the new 'image_default_path'. In the remote chance that the name of the image_default_path is 'files',
// we leave it alone.
if ($new_image_default_path != 'files' && substr($new_image_default_path, 0, strlen($filesdir_name) + 1) == ($filesdir_name . '/')) {
$new_image_default_path = substr($new_image_default_path, strlen($filesdir_name) + 1);
}
// Finally, the new image module counts on the 'image_default_path' to NOT end with a trailing '/'
$new_image_default_path = (substr($new_image_default_path, strlen($new_image_default_path) - 1) == '/') ? substr($new_image_default_path, 0, strlen($new_image_default_path) - 1) : $new_image_default_path;
// Now set the actual variable to the modified value so the new image module knows where to look
variable_set('image_default_path', $new_image_default_path);
// Now make sure this directory exists!
$dest_directory = $filesdir_name .'/'. $new_image_default_path;
file_check_directory($dest_directory, TRUE);
if (module_exist('image')) {
// Walk thru all images and move them to directory indicated by 'image_default_path', if they're not already there.
// Most likely, this will mean moving the thumbnails and previews if they exist. Originals are already in the directory.
$result = db_query("SELECT * FROM {image}");
while ($old_image = db_fetch_object($result)) {
// Handle the thumbnail
if (strlen($old_image->thumb_path)) {
$fid = db_next_id('{files}_fid');
// file_exists() is a PHP function, so it expects a path relative to main drupal directory, not relative
// to directory indicated by 'file_directory_path'
if (file_exists($old_image->thumb_path)) {
$image_info = image_get_info($old_image->thumb_path);
$final_path = $old_image->thumb_path;
if (file_copy($final_path, variable_get('image_default_path', $new_image_default_path) .'/'. basename($old_image->thumb_path), FILE_EXISTS_RENAME)) {
db_query("INSERT INTO {files} (fid, nid, filename, filepath, filemime, filesize, list) VALUES (%d, %d, '%s', '%s', '%s', %d, 0)", $fid, $old_image->nid, 'thumbnail', substr($final_path, strlen($filesdir_name) + 1), $image_info['mime_type'], filesize($old_image->thumb_path));
}
}
}
// Handle the original
if (strlen($old_image->image_path)) {
$path_wrt_filesdir = substr($old_image->image_path, strlen($filesdir_name) + 1);
$fid = db_next_id('{files}_fid');
if (file_exists($old_image->image_path)) {
$image_info = image_get_info($old_image->image_path);
$final_path = $old_image->image_path;
if (file_copy($final_path, variable_get('image_default_path', $new_image_default_path) .'/'. basename($old_image->image_path), FILE_EXISTS_RENAME)) {
db_query("INSERT INTO {files} (fid, nid, filename, filepath, filemime, filesize, list) VALUES (%d, %d, '%s', '%s', '%s', %d, 0)", $fid, $old_image->nid, '_original', substr($final_path, strlen($filesdir_name) + 1), $image_info['mime_type'], filesize($old_image->image_path));
}
}
}
// Handle the preview... if it exists
if (strlen($old_image->preview_path)) {
$path_wrt_filesdir = substr($old_image->preview_path, strlen($filesdir_name) + 1);
$fid = db_next_id('{files}_fid');
if (file_exists($old_image->preview_path)) {
$image_info = image_get_info($old_image->preview_path);
$final_path = $old_image->preview_path;
if (file_copy($final_path, variable_get('image_default_path', $new_image_default_path) .'/'. basename($old_image->preview_path), FILE_EXISTS_RENAME)) {
db_query("INSERT INTO {files} (fid, nid, filename, filepath, filemime, filesize, list) VALUES (%d, %d, '%s', '%s', '%s', %d, 0)", $fid, $old_image->nid, 'preview', substr($final_path, strlen($filesdir_name) + 1), $image_info['mime_type'], filesize($old_image->preview_path));
}
}
}
}
}
// END OF UPDATE for image
// ADDING MODULE location
$ret[] = update_sql("CREATE TABLE {location_node} (
nid int(10) unsigned NOT NULL default '0',
name varchar(255) default NULL,
street varchar(255) default NULL,
additional varchar(255) default NULL,
city varchar(255) default NULL,
province varchar(16) default NULL,
postal_code varchar(16) default NULL,
country char(2) default NULL,
latitude decimal(10,6) default NULL,
longitude decimal(10,6) default NULL,
exact tinyint(1) default '0',
PRIMARY KEY (nid)
) TYPE=MyISAM");
$ret[] = update_sql("CREATE TABLE {location_user} (
uid int(10) unsigned NOT NULL default '0',
name varchar(255) default NULL,
street varchar(255) default NULL,
additional varchar(255) default NULL,
city varchar(255) default NULL,
province varchar(16) default NULL,
postal_code varchar(16) default NULL,
country char(2) default NULL,
latitude decimal(10,6) default NULL,
longitude decimal(10,6) default NULL,
exact tinyint(1) default '0',
PRIMARY KEY (uid)
) TYPE=MyISAM");
// END OF ADDING MODULE location
// UPDATE for mailhandler
$ret[] = update_sql('ALTER TABLE {mailhandler} ADD extraimap varchar(255) not null');
$ret[] = update_sql("ALTER TABLE {mailhandler} ADD format int(4) NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {mailhandler} ADD prefix varchar(255) not null DEFAULT ''");
// END OF UPDATE for mailhandler
// UPDATE for massmailer
$ret[] = update_sql("CREATE TABLE {massmailertemplate} (
tid smallint(50) default NULL,
name text,
description text,
type varchar(32) default NULL,
subject text,
body text,
weight tinyint(1) default '0',
UNIQUE KEY tid (tid)
) TYPE=MyISAM");
// END OF UPDATE for massmailer
// UPDATE for node_privacy_byrole
// First, fix permissions for nodes that did not have their database entries in table {node_access} set properly from 4.5
if (module_exist('node_privacy_byrole')) {
$roles = array_keys(user_roles());
$result = db_query('SELECT nid, uid FROM {node}');
while ($row = db_fetch_object($result)) {
foreach ($roles as $rid) {
$res = db_query("SELECT nid FROM {node_access} WHERE nid = %d AND realm = '%s' AND gid = %d", $row->nid, 'node_privacy_byrole_role', $rid);
if (!db_fetch_object($res)) {
db_query("INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", $row->nid, $rid, 'node_privacy_byrole_role', 0, 0, 0);
}
}
if ($row->nid == 0) {
db_query("DELETE FROM {node_access} WHERE nid = %d AND realm = '%s' AND gid = %d", $row->nid, 'node_privacy_byrole_user', 0);
}
}
// New variables in node_privacy_byrole. Need to insert sensible defaults:
// For nodes of type contact_manager:
// Only admin users get full permissions (view, edit, and meta)
// Want to also make sure admins get full permissions for everything else
// Otherwise, by default, everyone gets view permissions
foreach (node_list() as $node_type) {
foreach (user_roles() as $rid => $role_name) {
$view_default_setting = 'npbr_forview_'. $node_type .'_default_'. $rid;
$edit_default_setting = 'npbr_foredit_'. $node_type .'_default_'. $rid;
$meta_setting = 'npbr_metaperm_'. $node_type .'_'. $rid;
if ($role_name == 'admin user') {
variable_set($view_default_setting, 1);
variable_set($edit_default_setting, 1);
variable_set($meta_setting, 1);
}
else {
if ($node_type == 'contact_manager' || $node_type == 'contact') {
variable_set($view_default_setting, 0);
variable_set($edit_default_setting, 0);
variable_set($meta_setting, 0);
}
else {
variable_set($view_default_setting, 1);
variable_set($edit_default_setting, 0);
variable_set($meta_setting, 0);
}
}
}
}
}
// END OF UPDATE for node_privacy_byrole
// UPDATE for phplist
// We're still using phplist 2.9.3, but we're getting rid of unused tables that haven't been gotten
// rid of previously
$ret[] = update_sql("DROP TABLE {phplist_messagedata}");
$ret[] = update_sql("DROP TABLE {phplist_sessiontable}");
$ret[] = update_sql("ALTER TABLE {phplist_user_blacklist} CHANGE added added datetime NOT NULL default '0000-00-00 00:00:00'");
// END OF UPDATE for phplist
// UPDATE for privatemsg
$ret[] = update_sql("ALTER TABLE {privatemsg} CHANGE new newmsg tinyint(3) unsigned NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {privatemsg} ADD format int(4) NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {privatemsg_archive} ADD format int(4) NOT NULL default '0'");
$ret[] = update_sql("UPDATE {privatemsg} SET format = 1");
$ret[] = update_sql("UPDATE {privatemsg_archive} SET format = 1");;
// END OF UPDATE for privatemsg
// UPDATE for rsvp
$ret[] = update_sql('DROP TABLE {rsvp_event}');
$ret[] = update_sql('DROP TABLE {rsvp_user_prefs}');
$ret[] = update_sql('RENAME TABLE {rsvp_to_user} TO {rsvp_invite}');
// END OF UPDATE for rsvp
// ADDING MODULE tinymce
$ret[] = update_sql("CREATE TABLE {tinymce_settings} (
name varchar(128) NOT NULL default '',
settings text NOT NULL,
PRIMARY KEY (name)
) TYPE=MyISAM");
$ret[] = update_sql("CREATE TABLE {tinymce_role} (
name varchar(128) NOT NULL default '',
rid tinyint(3) unsigned NOT NULL default '0',
UNIQUE KEY name (name,rid)
) TYPE=MyISAM");
// END OF ADDING MODULE tinymce
// UPDATE for trackback
$ret[] = update_sql("ALTER TABLE {trackback_received} ADD status tinyint(1) unsigned default '0'");
$ret[] = update_sql('UPDATE {trackback_received} SET status = 1');
$ret[] = update_sql("ALTER TABLE {trackback_received} ADD KEY nid (nid)");
$ret[] = update_sql("CREATE TABLE {spam_trackbacks} (
trid int(10) unsigned NOT NULL default '0',
rating int(2) unsigned default '0',
spam tinyint(1) unsigned default '0',
last int(11) unsigned default '0',
PRIMARY KEY trid (trid),
KEY rating (rating),
KEY spam (spam),
KEY last (last)
) TYPE=MyISAM");
// END OF UPDATE for trackback
// UPDATE for volunteer
$ret[] = update_sql("ALTER TABLE {volunteer} CHANGE eid nid int(10) unsigned NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {volunteer_contact_event} CHANGE eid nid int(10) unsigned NOT NULL default '0'");
$ret[] = update_sql("ALTER TABLE {volunteer_contact_event} DROP PRIMARY KEY");
$ret[] = update_sql("ALTER TABLE {volunteer_contact_event} ADD PRIMARY KEY (nid, cid)");
// END OF UPDATE for volunteer
// Internationalizing zipcodes table
if ($GLOBALS['db_type'] == 'mysql') {
$zipcodes_exists = FALSE;
$result = mysql_query('SHOW TABLES');
while($row = mysql_fetch_array($result)) {
if ($row[0] == $GLOBALS['db_prefix'] .'zipcodes') {
$zipcodes_exists = TRUE;
break;
}
}
if ($zipcodes_exists) {
$ret[] = update_sql("ALTER TABLE {zipcodes} ADD (country char(2) default '')");
$ret[] = update_sql("UPDATE {zipcodes} SET country = 'us'");
$ret[] = update_sql("ALTER TABLE {zipcodes} DROP PRIMARY KEY");
$ret[] = update_sql("ALTER TABLE {zipcodes} ADD (ziptemp varchar(16) NOT NULL default '')");
$ret[] = update_sql("UPDATE {zipcodes} SET ziptemp = LPAD(CONV(zip, 10, 10), 5, '0')");
$ret[] = update_sql("ALTER TABLE {zipcodes} DROP zip");
$ret[] = update_sql("ALTER TABLE {zipcodes} CHANGE ziptemp zip varchar(16) NOT NULL default ''");
$ret[] = update_sql("ALTER TABLE {zipcodes} ADD PRIMARY KEY (country, zip)");
}
}
// END of internationalizing zipcodes table
// MAKE SURE {search_total} exists.
// civicspace.mysql did not contain table def for {search_total}, added to Drupal core.
// However, the update function for CS 0.8.0.2 --> CS 0.8.0.3 did create the table.
// (Note: DB update for CS 0.8.0.2 --> CS 0.8.0.3 defined by function civic_update_10())
// This means some CS installations will have the table while others will not
// Need to check that table exists and need to create it if it doesn't.
if ($GLOBALS['db_type'] == 'mysql') {
$search_total_exists = FALSE;
$result = mysql_query('SHOW TABLES');
while($row = mysql_fetch_array($result)) {
if ($row[0] == $GLOBALS['db_prefix'] .'search_total') {
$search_total_exists = TRUE;
break;
}
}
if (!$search_total_exists) {
$ret[] = update_sql("CREATE TABLE {search_total} (
word varchar(50) NOT NULL default '',
count int(10) unsigned default NULL,
PRIMARY KEY word (word)
) TYPE=MyISAM");
}
}
// END OF MAKING SURE {search_total} exists
// FORCING DEFAULT THEME to civicspace
db_query("INSERT INTO {system} (type, name, filename, status, description) VALUES ('theme', 'civicspace', 'themes/civicspace/page.tpl.php', 1, 'themes/engines/phptemplate/phptemplate.engine')");
variable_set('theme_default', 'civicspace');
// END OF FORCING DEFAULT THEME to civicspace
return $ret;
}
function civic_update_12() {
$ret = array();
// MAKING SURE update_10() changes took place.
// civicspace.mysql for 0.8.0.3, 0.8.0.4, 0.8.0.5 does not reflect some of the schema changes
// made by the 0.8.0.2 --> 0.8.0.3 update as defined in civic_update_10(). Specifically,
// the cs 0.8.0.2 --> 0.8.0.3 update performs the necessary column changes to tables
// {search_index} and {blocks} and adds the new {search_total} table, but these column
// changes and new table are not present in the initital civicspace.mysql dumps for 0.8.0.2-4.
// A special check for the existence of the {search_total} table already exists in
// civic_update_11(), the update for CS 0.8.0.5 --> CS 0.8.1
// Here, we need to check for the column changes to {search_index} and {blocks}
if ($GLOBALS['db_type'] == 'mysql') {
// Make sure 'path' column has been removed from {blocks}
if (db_fetch_object(db_query("SHOW COLUMNS FROM {blocks} LIKE 'path'"))) {
$ret[] = update_sql('ALTER TABLE {blocks} DROP path');
}
// Make sure 'visibility' column has been added to {blocks}
if (!db_fetch_object(db_query("SHOW COLUMNS FROM {blocks} LIKE 'visibility'"))) {
$ret[] = update_sql('ALTER TABLE {blocks} ADD visibility tinyint(1) NOT NULL');
}
// Make sure 'pages' column has been added to {blocks}
if (!db_fetch_object(db_query("SHOW COLUMNS FROM {blocks} LIKE 'pages'"))) {
$ret[] = update_sql('ALTER TABLE {blocks} ADD pages text NOT NULL');
}
// Make sure changes to {search_index} took place. Original update function simply
// dropped old table and created the new table. We do the same if we see that any
// of of the old columns is still present
if (db_fetch_object(db_query("SHOW COLUMNS FROM {search_index} LIKE 'lno'")) ||
db_fetch_object(db_query("SHOW COLUMNS FROM {search_index} LIKE 'count'"))) {
$ret[] = update_sql('DROP TABLE {search_index}');
$ret[] = update_sql("CREATE TABLE {search_index} (
word varchar(50) NOT NULL default '',
sid int(10) unsigned NOT NULL default '0',
type varchar(16) default NULL,
fromsid int(10) unsigned NOT NULL default '0',
fromtype varchar(16) default NULL,
score int(10) unsigned default NULL,
KEY sid (sid),
KEY fromsid (fromsid),
KEY word (word)
) TYPE=MyISAM");
}
}
// END OF MAKING SURE update_10() changes took place.
// FIXING EVENT module event_end_time column in table {event}
// The old event module did not have a column for the end time of an event.
// We need to force this new column to hold an event_end_time that is equal
// to the event_start_time, otherwise event_end_time = 0, by default. This
// is bad because the calendar show that event as if it is happening everyday
// after and including the event_start_time
db_query('UPDATE {event} SET event_end = event_start WHERE event_end = 0');
// END OF FIXING EVENT module event_end_column in table {event}
// FIXING BLANK UPDATE-created TITLE field from event_upgrade script in civic_update_11()
// See http://drupal.org/node/20773 and http://drupal.org/node/20658 for details
if ($result = db_fetch_object(db_query("SELECT ctype_id FROM {flexinode_type} WHERE name = 'event'"))) {
db_query("DELETE FROM {flexinode_field} WHERE ctype_id = %d AND label = ''", $result->ctype_id);
}
// END OF FIXING BLANK UPDATE-create TITLE field from event upgrade script in civic_update_11()
return $ret;
}
function civic_update_13() {
$ret = array();
if ($GLOBALS['db_type'] == 'mysql') {
$zipcodes_exists = FALSE;
$result = mysql_query('SHOW TABLES');
while($row = mysql_fetch_array($result)) {
if ($row[0] == $GLOBALS['db_prefix'] .'zipcodes') {
$zipcodes_exists = TRUE;
break;
}
}
if (!$zipcodes_exists) {
$ret[] = update_sql("CREATE TABLE {zipcodes} (
zip varchar(16) NOT NULL default '0',
city varchar(30) NOT NULL default '',
state varchar(30) NOT NULL default '',
latitude decimal(10,6) NOT NULL default '0.000000',
longitude decimal(10,6) NOT NULL default '0.000000',
timezone tinyint(2) NOT NULL default '0',
dst tinyint(1) NOT NULL default '0',
country char(2) NOT NULL default '',
PRIMARY KEY (country,zip),
KEY pc (country,zip),
KEY zip (zip),
KEY latitude (latitude),
KEY longitude (longitude),
KEY country (country)
) TYPE=MyISAM");
}
}
return $ret;
}
function civic_update_14() {
global $base_url;
$ret = array();
// ADDING MODULE civicrm
// Since the CiviCRM tables don't use a prefix and reside in a single database (possibly for multiple sites) we first must check
// to see if any of the tables exist. If they do, then we know that the CiviCRM tables have been installed by another domain using
// the same server and file-tree and we proceed no further.
$civicrm_tables_exist = FALSE;
$table_names = array('civicrm_mailing_event_unsubscribe', 'civicrm_mailing_event_trackable_url_open', 'civicrm_mailing_event_reply', 'civicrm_mailing_event_opened', 'civicrm_mailing_event_forward', 'civicrm_mailing_event_delivered', 'civicrm_mailing_event_bounce', 'civicrm_mailing_event_queue', 'civicrm_group_contact', 'civicrm_im', 'civicrm_email', 'civicrm_address', 'civicrm_activity_history', 'civicrm_activity', 'civicrm_mailing_event_confirm', 'civicrm_mailing_event_subscribe', 'civicrm_relationship', 'civicrm_subscription_history', 'civicrm_group', 'civicrm_uf_match', 'civicrm_phonecall', 'civicrm_phone', 'civicrm_note', 'civicrm_meeting', 'civicrm_location', 'civicrm_import_mapping_field', 'civicrm_entity_tag', 'civicrm_email_history', 'civicrm_custom_value', 'civicrm_custom_option', 'civicrm_custom_field', 'civicrm_custom_group', 'civicrm_county', 'civicrm_activity_type', 'civicrm_donation_page', 'civicrm_mailing_bounce_pattern', 'civicrm_mailing_bounce_type', 'civicrm_mailing_job', 'civicrm_mailing_trackable_url', 'civicrm_mailing_group', 'civicrm_mailing', 'civicrm_mailing_component', 'civicrm_saved_search', 'civicrm_relationship_type', 'civicrm_organization', 'civicrm_individual', 'civicrm_household', 'civicrm_contact', 'civicrm_validation', 'civicrm_uf_field', 'civicrm_uf_group', 'civicrm_tag', 'civicrm_state_province', 'civicrm_mobile_provider', 'civicrm_location_type', 'civicrm_import_mapping', 'civicrm_im_provider', 'civicrm_geo_coord', 'civicrm_domain', 'civicrm_country');
$existing_tables = array();
$result = db_query('SHOW TABLES');
while($row = db_fetch_array($result)) {
$existing_tables[] = $row[0];
}
if (count(array_intersect($table_names, $existing_tables))) {
$civicrm_tables_exist = TRUE;
}
if (!$civicrm_tables_exist) {
// First, we need to find out what version or MySQL we are using since the schema for MySQL 4.0 varies slightly from the
// schema for MySQL 4.1
$db_version_check = db_fetch_object(db_query('SELECT VERSION() AS version'));
if ($last = strrpos($db_version_check->version, '_')) {
$db_version_check->version = substr($db_version_check->version, 0, $last);
}
if ($last = strrpos($db_version_check->version, '-')) {
$db_version_check->version = substr($db_version_check->version, 0, $last);
}
$mysql_version = explode('.', $db_version_check->version);
if ($mysql_version[0] > 3) {
if ($mysql_version[1] == 0) {
$mysql_version_confirmed = '4.0';
// Beginning of create tables from civicrm_40.mysql
//*************************************************************************************************************************
//*************************************************************************************************************************
$ret[] = update_sql('CREATE TABLE civicrm_acl (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
deny tinyint NOT NULL DEFAULT 0 COMMENT \'Is this ACL entry Allow (0) or Deny (1) ?\',
entity_table varchar(64) NOT NULL COMMENT \'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)\',
entity_id int unsigned COMMENT \'ID of the object possessing this ACL\',
operation enum(\'View\', \'Edit\', \'Create\', \'Delete\', \'Grant\', \'Revoke\') NOT NULL COMMENT \'What operation does this ACL entry control?\',
object_table varchar(64) COMMENT \'The table of the object controlled by this ACL entry\',
object_id int unsigned COMMENT \'The ID of the object controlled by this ACL entry\',
acl_table varchar(64) COMMENT \'If this is a grant/revoke entry, what table are we granting?\',
acl_id int unsigned COMMENT \'ID of the ACL or ACL group being granted/revoked\'
,
PRIMARY KEY ( id )
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_country (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Country Id\',
name varchar(64) COMMENT \'Country Name\',
iso_code char(2) COMMENT \'ISO Code\',
country_code varchar(4) COMMENT \'National prefix to be used when dialing TO this country.\',
idd_prefix varchar(4) COMMENT \'International direct dialing prefix from within the country TO another country\',
ndd_prefix varchar(4) COMMENT \'Access prefix to call within a country to a different area\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_iso_code(
name
, iso_code
)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_domain (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Domain ID\',
name varchar(64) COMMENT \'Name of Domain / Organization\',
description varchar(255) COMMENT \'Description of Domain.\',
contact_name varchar(64) COMMENT \'Name of the person responsible for this domain\',
email_domain varchar(64) COMMENT \'The domain from which outgoing email for this domain will appear to originate\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name(
name
)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_acl_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this group.\',
is_active tinyint DEFAULT 1 COMMENT \'Is this ACL Group currently active?\',
title varchar(64) COMMENT \'ACL Group Title\'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_acl_group_join (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
acl_group_id int unsigned NOT NULL COMMENT \'Foreign Key to ACL Group\',
entity_table varchar(64) NOT NULL COMMENT \'Table of the object joined to the ACL Group (Contact or Group)\',
entity_id int unsigned NOT NULL COMMENT \'ID of the group/contact object being joined\'
,
PRIMARY KEY ( id )
, INDEX FKEY_acl_group_id ( acl_group_id ) ,
FOREIGN KEY (acl_group_id) REFERENCES civicrm_acl_group(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_geo_coord (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Geo Coord ID\',
coord_type enum(\'LatLong\', \'Projected\') COMMENT \'Projected or unprojected coordinates - projected coordinates (e.g. UTM) may be treated as cartesian by some modules.\',
coord_units enum(\'Degree\', \'Grad\', \'Radian\', \'Foot\', \'Meter\') COMMENT \'If the coord_type is LATLONG, indicate the unit of angular measure: Degree|Grad|Radian. If the coord_type is Projected, indicate unit of distance measure: Foot|Meter.\',
coord_ogc_wkt_string text COMMENT \'Coordinate sys description in Open GIS Consortium WKT (well known text) format - see http://www.opengeospatial.org/docs/01-009.pdf this is provided for the convenience of the user or third party modules.\'
,
PRIMARY KEY ( id )
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_gender (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Gender ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this gender.\',
name varchar(64) COMMENT \'Gender Name.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls Gender order in the select box.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_im_provider (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'IM Provider ID\',
name varchar(64) COMMENT \'Name of IM Provider.\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
is_reserved tinyint COMMENT \'Is this entry a predefined system option?\',
is_active tinyint COMMENT \'Is this entry active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mapping (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Mapping ID\',
domain_id int unsigned NOT NULL COMMENT \'Domain to which this mapping belongs\',
name varchar(64) COMMENT \'Name of Mapping\',
description varchar(255) COMMENT \'Description of Mapping.\',
mapping_type enum(\'Export\', \'Import\') COMMENT \'Type of Mapping.\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name(
name
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_individual_prefix (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Individual Prefix ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this individual prefix.\',
name varchar(64) COMMENT \'Individual Prefix Name.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls Individual Prefix order in the select box.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_individual_suffix (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Individual Suffix ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this individual suffix.\',
name varchar(64) COMMENT \'Individual Suffix Name.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls Individual Suffix order in the select box.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_location_type (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Location Type ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this location type.\',
name varchar(64) COMMENT \'Location Type Name.\',
vcard_name varchar(4) COMMENT \'vCard Location Type Name.\',
description varchar(255) COMMENT \'Location Type Description.\',
is_reserved tinyint COMMENT \'Is this location type a predefined system location?\',
is_active tinyint COMMENT \'Is this property active?\',
is_default tinyint COMMENT \'Is this location type the default?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mobile_provider (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Mobile Provider ID\',
name varchar(64) COMMENT \'Name of Mobile Provider.\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
is_reserved tinyint COMMENT \'Is this entry a predefined system option?\',
is_active tinyint COMMENT \'Is this entry active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_state_province (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'State / Province ID\',
name varchar(64) COMMENT \'Name of State / Province\',
abbreviation varchar(4) COMMENT \'2-4 Character Abbreviation of State / Province\',
country_id int unsigned NOT NULL COMMENT \'ID of Country that State / Province belong\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_country_id(
name
, country_id
)
, INDEX FKEY_country_id ( country_id ) ,
FOREIGN KEY (country_id) REFERENCES civicrm_country(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_tag (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Tag ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this tag\',
name varchar(64) COMMENT \'Name of Tag.\',
description varchar(255) COMMENT \'Optional verbose description of the tag.\',
parent_id int unsigned DEFAULT NULL COMMENT \'Optional parent id for this tag.\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
, INDEX FKEY_parent_id ( parent_id ) ,
FOREIGN KEY (parent_id) REFERENCES civicrm_tag(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_uf_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this form.\',
is_active tinyint DEFAULT 1 COMMENT \'Is this form currently active? If false, hide all related fields for all sharing contexts.\',
form_type enum(\'CiviCRM Profile\') COMMENT \'Type of form.\',
title varchar(64) COMMENT \'Form title.\',
help_pre text COMMENT \'Description and/or help text to display before fields in form.\',
help_post text COMMENT \'Description and/or help text to display after fields in form.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls display order when multiple user framework groups are setup for concurrent display.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_uf_field (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
uf_group_id int unsigned NOT NULL COMMENT \'Which form does this field belong to.\',
field_name varchar(64) COMMENT \'Name for CiviCRM field which is being exposed for sharing.\',
is_active tinyint DEFAULT 1 COMMENT \'Is this field currently shareable? If false, hide the field for all sharing contexts.\',
is_view tinyint DEFAULT 0 COMMENT \'the field is view only and not editable in user forms.\',
is_required tinyint DEFAULT 0 COMMENT \'Is this field required when included in a user or registration form?\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls field display order when user framework fields are displayed in registration and account editing forms.\',
help_post text COMMENT \'Description and/or help text to display after this field.\',
is_registration tinyint DEFAULT 0 COMMENT \'Is this field included in new user registration forms?\',
is_match tinyint DEFAULT 0 COMMENT \'Is this field part of the key for matching users to contacts?\',
visibility enum(\'User and User Admin Only\', \'Public User Pages\', \'Public User Pages and Listings\') DEFAULT \'User and User Admin Only\' COMMENT \'In what context(s) is this field visible.\',
in_selector tinyint DEFAULT 0 COMMENT \'Is this field included as a column in the selector table?\'
,
PRIMARY KEY ( id )
, INDEX FKEY_uf_group_id ( uf_group_id ) ,
FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_validation (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Validation ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
type enum(\'Email\', \'Money\', \'URL\', \'Phone\', \'Positive Integer\', \'Variable Name\', \'Range\', \'Regular Expression Match\', \'Regular Expression No Match\') COMMENT \'List of rule built-in rule types. custom types may be added to ENUM via directory scan.\',
parameters varchar(255) COMMENT \'optional value(s) passed to validation function, e.g. a regular expression, min and max for Range, operator + number for Comparison type, etc.\',
function_name varchar(128) COMMENT \'custom validation function name. Class methods should be invoked using php syntax array(CLASS_NAME, FN_NAME)\',
description varchar(255) COMMENT \'Rule Description.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_contact (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Contact ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
contact_type enum(\'Individual\', \'Organization\', \'Household\') COMMENT \'Type of Contact.\',
legal_identifier varchar(32) COMMENT \'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.\',
external_identifier varchar(32) COMMENT \'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.\',
sort_name varchar(128) COMMENT \'Name used for sorting different contact types\',
display_name varchar(128) COMMENT \'Formatted name representing preferred format for display/print/other output.\',
nick_name varchar(128) COMMENT \'Nick Name.\',
home_URL varchar(128) COMMENT \'optional "home page" URL for this contact.\',
image_URL varchar(128) COMMENT \'optional URL for preferred image (photo, logo, etc.) to display for this contact.\',
source varchar(255) COMMENT \'where domain_id contact come from, e.g. import, donate module insert...\',
preferred_communication_method enum(\'Phone\', \'Email\', \'Post\') COMMENT \'What is the preferred mode of communication.\',
preferred_mail_format enum(\'Text\', \'HTML\', \'Both\') DEFAULT "Text" COMMENT \'What is the preferred mode of sending an email.\',
do_not_phone tinyint DEFAULT 0 ,
do_not_email tinyint DEFAULT 0 ,
do_not_mail tinyint DEFAULT 0 ,
do_not_trade tinyint DEFAULT 0 ,
hash int unsigned NOT NULL COMMENT \'Key for validating requests related to this contact.\',
is_opt_out tinyint NOT NULL DEFAULT 0 COMMENT \'Has the contact opted out from the org?\'
,
PRIMARY KEY ( id )
, INDEX index_sort_name(
sort_name
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_household (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Household ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
household_name varchar(128) COMMENT \'Household Name.\',
primary_contact_id int unsigned COMMENT \'Optional FK to Primary Contact for this household.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_primary_contact_id ( primary_contact_id ) ,
FOREIGN KEY (primary_contact_id) REFERENCES civicrm_contact(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_individual (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Individual ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
first_name varchar(64) COMMENT \'First Name.\',
middle_name varchar(64) COMMENT \'Middle Name.\',
last_name varchar(64) COMMENT \'Last Name.\',
prefix_id int unsigned COMMENT \'Prefix or Title for name (Ms, Mr...). FK to prefix ID\',
suffix_id int unsigned COMMENT \'Suffix for name (Jr, Sr...). FK to suffix ID\',
greeting_type enum(\'Formal\', \'Informal\', \'Honorific\', \'Custom\', \'Other\') COMMENT \'Preferred greeting format.\',
custom_greeting varchar(128) COMMENT \'Custom greeting message.\',
job_title varchar(64) COMMENT \'Job Title\',
gender_id int unsigned COMMENT \'FK to gender ID\',
birth_date date COMMENT \'Date of birth\',
is_deceased tinyint DEFAULT 0 ,
phone_to_household_id int unsigned COMMENT \'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.\',
email_to_household_id int unsigned COMMENT \'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.\',
mail_to_household_id int unsigned COMMENT \'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_prefix_id ( prefix_id ) ,
FOREIGN KEY (prefix_id) REFERENCES civicrm_individual_prefix(id)
, INDEX FKEY_suffix_id ( suffix_id ) ,
FOREIGN KEY (suffix_id) REFERENCES civicrm_individual_suffix(id)
, INDEX FKEY_gender_id ( gender_id ) ,
FOREIGN KEY (gender_id) REFERENCES civicrm_gender(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_organization (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Organization ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
organization_name varchar(128) COMMENT \'Organization Name.\',
legal_name varchar(128) COMMENT \'Legal Name.\',
sic_code varchar(8) COMMENT \'Standard Industry Classification Code.\',
primary_contact_id int unsigned COMMENT \'Optional FK to Primary Contact for this organization.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_primary_contact_id ( primary_contact_id ) ,
FOREIGN KEY (primary_contact_id) REFERENCES civicrm_contact(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_relationship_type (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Primary key\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
name_a_b varchar(64) COMMENT \'name/label for relationship of contact_a to contact_b.\',
name_b_a varchar(64) COMMENT \'Optional name/label for relationship of contact_b to contact_a.\',
description varchar(255) COMMENT \'Optional verbose description of the relationship type.\',
contact_type_a enum(\'Individual\', \'Organization\', \'Household\') COMMENT \'If defined, contact_a in a relationship of this type must be a specific contact_type.\',
contact_type_b enum(\'Individual\', \'Organization\', \'Household\') COMMENT \'If defined, contact_b in a relationship of this type must be a specific contact_type.\',
is_reserved tinyint COMMENT \'Is this relationship type a predefined system type (can not be changed or de-activated)?\',
is_active tinyint DEFAULT 1 COMMENT \'Is this relationship type currently active (i.e. can be used when creating or editing relationships)?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_a_b_domain_id(
name_a_b
, domain_id
)
, UNIQUE INDEX UI_name_b_a_domain_id(
name_b_a
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_saved_search (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Saved search ID\',
domain_id int unsigned NOT NULL COMMENT \'which organization/domain owns this search\',
query text COMMENT \'SQL query for this search\',
form_values text COMMENT \'Submitted form values for this search\',
is_active tinyint COMMENT \'Is this entry active?\'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_component (
id int unsigned NOT NULL AUTO_INCREMENT ,
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this component\',
name varchar(64) COMMENT \'The name of this component\',
component_type enum(\'Header\', \'Footer\', \'Subscribe\', \'Welcome\', \'Unsubscribe\', \'OptOut\', \'Reply\') COMMENT \'Type of Component.\',
subject varchar(255) ,
body_html text COMMENT \'Body of the component in html format.\',
body_text text COMMENT \'Body of the component in text format.\',
is_default tinyint DEFAULT 0 COMMENT \'Is this the default component for this component_type?\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing (
id int unsigned NOT NULL AUTO_INCREMENT ,
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this mailing\',
header_id int unsigned NOT NULL COMMENT \'FK to the header component.\',
footer_id int unsigned NOT NULL COMMENT \'FK to the footer component.\',
reply_id int unsigned NOT NULL COMMENT \'FK to the auto-responder component.\',
unsubscribe_id int unsigned NOT NULL COMMENT \'FK to the unsubscribe component.\',
optout_id int unsigned NOT NULL COMMENT \'FK to the opt-out component.\',
name varchar(128) COMMENT \'Mailing Name.\',
from_name varchar(128) COMMENT \'From Header of mailing\',
from_email varchar(128) COMMENT \'From Email of mailing\',
replyto_email varchar(128) COMMENT \'Reply-To Email of mailing\',
subject varchar(128) COMMENT \'Subject of mailing\',
body_text text COMMENT \'Body of the mailing in text format.\',
body_html text COMMENT \'Body of the mailing in html format.\',
is_template tinyint COMMENT \'Is this object a mailing template?\',
url_tracking tinyint COMMENT \'Should we track URL click-throughs for this mailing?\',
forward_replies tinyint COMMENT \'Should we forward replies back to the author?\',
auto_responder tinyint COMMENT \'Should we enable the auto-responder?\',
open_tracking tinyint COMMENT \'Should we track when recipients open/read this mailing?\',
is_completed tinyint COMMENT \'Has at least one job associated with this mailing finished?\'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
, INDEX FKEY_header_id ( header_id ) ,
FOREIGN KEY (header_id) REFERENCES civicrm_mailing_component(id)
, INDEX FKEY_footer_id ( footer_id ) ,
FOREIGN KEY (footer_id) REFERENCES civicrm_mailing_component(id)
, INDEX FKEY_reply_id ( reply_id ) ,
FOREIGN KEY (reply_id) REFERENCES civicrm_mailing_component(id)
, INDEX FKEY_unsubscribe_id ( unsubscribe_id ) ,
FOREIGN KEY (unsubscribe_id) REFERENCES civicrm_mailing_component(id)
, INDEX FKEY_optout_id ( optout_id ) ,
FOREIGN KEY (optout_id) REFERENCES civicrm_mailing_component(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_group (
id int unsigned NOT NULL AUTO_INCREMENT ,
mailing_id int unsigned NOT NULL COMMENT \'The ID of a previous mailing to include/exclude recipients.\',
group_type enum(\'Include\', \'Exclude\') COMMENT \'Are the members of the group included or excluded?.\',
entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_mailing_id ( mailing_id ) ,
FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_trackable_url (
id int unsigned NOT NULL AUTO_INCREMENT ,
url varchar(255) NOT NULL COMMENT \'The URL to be tracked.\',
mailing_id int unsigned NOT NULL COMMENT \'FK to the mailing\'
,
PRIMARY KEY ( id )
, INDEX FKEY_mailing_id ( mailing_id ) ,
FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_job (
id int unsigned NOT NULL AUTO_INCREMENT ,
mailing_id int unsigned NOT NULL COMMENT \'The ID of the mailing this Job will send.\',
scheduled_date datetime COMMENT \'date on which this job was scheduled.\',
start_date datetime COMMENT \'date on which this job was started.\',
end_date datetime COMMENT \'date on which this job ended.\',
status enum(\'Scheduled\', \'Running\', \'Complete\', \'Paused\', \'Canceled\') COMMENT \'The state of this job\',
is_retry tinyint COMMENT \'Is this job a retry?\'
,
PRIMARY KEY ( id )
, INDEX FKEY_mailing_id ( mailing_id ) ,
FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_bounce_type (
id int unsigned NOT NULL AUTO_INCREMENT ,
name enum(\'AOL\', \'Away\', \'DNS\', \'Host\', \'Inactive\', \'Invalid\', \'Loop\', \'Quota\', \'Relay\', \'Spam\', \'Syntax\', \'Unknown\') NOT NULL COMMENT \'Type of bounce\',
description varchar(255) COMMENT \'A description of this bounce type\',
hold_threshold int unsigned NOT NULL COMMENT \'Number of bounces of this type required before the email address is put on bounce hold\'
,
PRIMARY KEY ( id )
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_bounce_pattern (
id int unsigned NOT NULL AUTO_INCREMENT ,
bounce_type_id int unsigned NOT NULL COMMENT \'Type of bounce\',
pattern varchar(255) COMMENT \'A regexp to match a message to a bounce type\'
,
PRIMARY KEY ( id )
, INDEX FKEY_bounce_type_id ( bounce_type_id ) ,
FOREIGN KEY (bounce_type_id) REFERENCES civicrm_mailing_bounce_type(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_donation_page (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Donation Page Id\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
is_active tinyint COMMENT \'Is this property active?\',
name varchar(64) COMMENT \'Donation Page Name\',
description varchar(255) COMMENT \'Description\',
intro_title varchar(64) COMMENT \'Introduction Title\',
intro_description varchar(255) COMMENT \'Introduction Description\',
anonymous tinyint COMMENT \'Allow anonymous donations for this page ?\'
,
PRIMARY KEY ( id )
, INDEX index_name(
name
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_activity_type (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Activity Type ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this activity type.\',
name varchar(64) COMMENT \'Activity Type Name.\',
description varchar(255) COMMENT \'Activity Type Description.\',
is_reserved tinyint COMMENT \'Is this activity type a predefined system activity?\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_county (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'County ID\',
name varchar(64) COMMENT \'Name of County\',
abbreviation varchar(4) COMMENT \'2-4 Character Abbreviation of County\',
state_province_id int unsigned NOT NULL COMMENT \'ID of State / Province that County belongs\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_state_id(
name
, state_province_id
)
, INDEX FKEY_state_province_id ( state_province_id ) ,
FOREIGN KEY (state_province_id) REFERENCES civicrm_state_province(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Custom Group ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
name varchar(64) COMMENT \'Variable name/programmatic handle for this group.\',
title varchar(64) COMMENT \'Friendly Name.\',
extends enum(\'Contact\', \'Individual\', \'Household\', \'Organization\', \'Location\', \'Address\') DEFAULT \'Contact\' COMMENT \'Type of object this group extends (can add other options later e.g. contact_address, etc.).\',
style enum(\'Tab\', \'Inline\') COMMENT \'Visual relationship between this form and its parent.\',
collapse_display int unsigned DEFAULT 0 COMMENT \'Will this group be in collapsed or expanded mode on initial display ?\',
help_pre text COMMENT \'Description and/or help text to display before fields in form.\',
help_post text COMMENT \'Description and/or help text to display after fields in form.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls display order when multiple extended property groups are setup for the same class.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_title_domain_id(
title
, domain_id
)
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_field (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Custom Field ID\',
custom_group_id int unsigned NOT NULL COMMENT \'FK to civicrm_custom_group.\',
name varchar(64) COMMENT \'Variable name/programmatic handle for this property.\',
label varchar(64) COMMENT \'Text for form field label (also friendly name for administering this custom property).\',
data_type enum(\'String\', \'Int\', \'Float\', \'Money\', \'Memo\', \'Date\', \'Boolean\', \'StateProvince\', \'Country\') COMMENT \'Controls location of data storage in extended_data table.\',
html_type enum(\'Text\', \'TextArea\', \'Select\', \'Radio\', \'CheckBox\', \'Select Date\', \'Select State/Province\', \'Select Country\') COMMENT \'HTML types plus several built-in extended types.\',
default_value varchar(255) COMMENT \'Use form_options.is_default for field_types which use options.\',
is_required tinyint COMMENT \'Is a value required for this property.\',
is_searchable tinyint COMMENT \'Is this property searchable.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls field display order within an extended property group.\',
validation_id int unsigned COMMENT \'FK to civicrm_validation. Will be used for custom validation functions.\',
help_pre text COMMENT \'Description and/or help text to display before this field.\',
help_post text COMMENT \'Description and/or help text to display after this field.\',
mask varchar(64) COMMENT \'Optional format instructions for specific field types, like date types.\',
attributes varchar(255) COMMENT \'Store collection of type-appropriate attributes, e.g. textarea needs rows/cols attributes\',
javascript varchar(255) COMMENT \'Optional scripting attributes for field.\',
is_active tinyint COMMENT \'Is this property active?\',
options_per_line int unsigned COMMENT \'number of options per line for checkbox and radio\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_label_custom_group_id(
label
, custom_group_id
)
, INDEX FKEY_custom_group_id ( custom_group_id ) ,
FOREIGN KEY (custom_group_id) REFERENCES civicrm_custom_group(id)
, INDEX FKEY_validation_id ( validation_id ) ,
FOREIGN KEY (validation_id) REFERENCES civicrm_validation(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_option (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Custom Option ID\',
custom_field_id int unsigned NOT NULL COMMENT \'FK to civicrm_custom_field.\',
label varchar(64) COMMENT \'Label for option\',
value varchar(64) COMMENT \'Value of the option (when form is submitted)\',
weight int NOT NULL DEFAULT 1 COMMENT \'Order in which the options are displayed\',
is_active tinyint COMMENT \'Is this option active ?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_label_custom_field_id(
value
, custom_field_id
)
, INDEX FKEY_custom_field_id ( custom_field_id ) ,
FOREIGN KEY (custom_field_id) REFERENCES civicrm_custom_field(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_value (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique ID\',
custom_field_id int unsigned NOT NULL COMMENT \'Foreign key to civicrm_ext_property.\',
entity_table varchar(64) COMMENT \'physical tablename for entity being extended by this data, e.g. civicrm_contact\',
entity_id int unsigned NOT NULL COMMENT \'FK to record in the entity table specified by entity_table column.\',
int_data int COMMENT \'stores data for ext property data_type = integer. This col supports signed integers.\',
float_data float COMMENT \'stores data for ext property data_type = float.\',
decimal_data decimal(20,2) COMMENT \'stores data for ext property data_type = money.\',
char_data varchar(255) COMMENT \'data for ext property data_type = text.\',
date_data date COMMENT \'data for ext property data_type = date.\',
memo_data text COMMENT \'data for ext property data_type = memo.\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
, INDEX FKEY_custom_field_id ( custom_field_id ) ,
FOREIGN KEY (custom_field_id) REFERENCES civicrm_custom_field(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_email_history (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Email History ID\',
subject varchar(255) COMMENT \'Subject of the email.\',
message text COMMENT \'Contents of the email.\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact who is sending this email\',
sent_date date COMMENT \'When was this email sent\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_entity_tag (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'primary key\',
entity_table varchar(64) COMMENT \'physical tablename for entity being tagged, e.g. civicrm_contact\',
entity_id int unsigned NOT NULL COMMENT \'FK to entity table specified in entity_table column.\',
tag_id int unsigned NOT NULL COMMENT \'FK to civicrm_tag\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
, INDEX FKEY_tag_id ( tag_id ) ,
FOREIGN KEY (tag_id) REFERENCES civicrm_tag(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mapping_field (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Mapping Field ID\',
mapping_id int unsigned NOT NULL COMMENT \'Mapping to which this field belongs\',
name varchar(64) COMMENT \'Mapping field key\',
contact_type varchar(64) COMMENT \'Contact Type in mapping\',
column_number int unsigned NOT NULL COMMENT \'Column number for mapping set\',
location_type_id int unsigned COMMENT \'Location type of this mapping, if required\',
phone_type varchar(64) COMMENT \'Phone type, if required\',
relationship_type_id int unsigned COMMENT \'Relationship type, if required\'
,
PRIMARY KEY ( id )
, INDEX FKEY_mapping_id ( mapping_id ) ,
FOREIGN KEY (mapping_id) REFERENCES civicrm_mapping(id)
, INDEX FKEY_location_type_id ( location_type_id ) ,
FOREIGN KEY (location_type_id) REFERENCES civicrm_location_type(id)
, INDEX FKEY_relationship_type_id ( relationship_type_id ) ,
FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_location (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Location ID\',
entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
location_type_id int unsigned NOT NULL COMMENT \'FK to Location Type ID\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary location for the contact. (allow only ONE primary location / contact.)\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
, INDEX index_entity_location_type(
entity_table
, entity_id
, location_type_id
)
, INDEX FKEY_location_type_id ( location_type_id ) ,
FOREIGN KEY (location_type_id) REFERENCES civicrm_location_type(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_meeting (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Meeting ID\',
source_contact_id int unsigned NOT NULL COMMENT \'Contact ID of person scheduling or logging this meeting. This will generally an authenticated user.\',
target_entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
target_entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
subject varchar(64) COMMENT \'The subject/purpose of this meeting.\',
scheduled_date_time datetime COMMENT \'Date and time meeting is scheduled to occur.\',
duration_hours int unsigned COMMENT \'Planned or actual duration of meeting - hours.\',
duration_minutes int unsigned COMMENT \'Planned or actual duration of meeting - minutes.\',
location varchar(255) COMMENT \'Where will the meeting be held ?\',
details text COMMENT \'Details about the meeting (agenda, notes, etc).\',
status enum(\'Scheduled\', \'Completed\') COMMENT \'What is the status of this meeting? Completed meeting status results in activity history entry.\',
parent_id int unsigned COMMENT \'Parent meeting ID (if this is a follow-up item). This is not currently implemented\'
,
PRIMARY KEY ( id )
, INDEX FKEY_source_contact_id ( source_contact_id ) ,
FOREIGN KEY (source_contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_parent_id ( parent_id ) ,
FOREIGN KEY (parent_id) REFERENCES civicrm_meeting(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_note (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Note ID\',
entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
note text COMMENT \'Note and/or Comment.\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID creator\',
modified_date date COMMENT \'When was this note last modified/edited\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_phone (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Phone ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this phone belong to.\',
phone varchar(32) COMMENT \'Complete phone number.\',
phone_type enum(\'Phone\', \'Mobile\', \'Fax\', \'Pager\') COMMENT \'What type of telecom device is this.\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary phone for this contact and location.\',
mobile_provider_id int unsigned COMMENT \'Which Mobile Provider does this phone belong to.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_location_id ( location_id ) ,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
, INDEX FKEY_mobile_provider_id ( mobile_provider_id ) ,
FOREIGN KEY (mobile_provider_id) REFERENCES civicrm_mobile_provider(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_phonecall (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Phone call ID\',
source_contact_id int unsigned NOT NULL COMMENT \'Contact ID of person making the call. This will generally an authenticated user.\',
target_entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
target_entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
subject varchar(64) COMMENT \'Short description of the subject of this call.\',
scheduled_date_time datetime COMMENT \'Date and time phonecall is scheduled to be made.\',
duration_hours int unsigned COMMENT \'Planned or actual duration of call - hours.\',
duration_minutes int unsigned COMMENT \'Planned or actual duration of call - minutes.\',
phone_id int unsigned COMMENT \'Phone ID of the number called (optional - used if an existing phone number is selected).\',
phone_number varchar(64) COMMENT \'Phone number in case the number does not exist in the civicrm_phone table.\',
details text COMMENT \'Details about the call.\',
status enum(\'Scheduled\', \'Left Message\', \'Unreachable\', \'Completed\') COMMENT \'What is the status of this phone call? Completed calls result in activity history entry.\',
parent_id int unsigned COMMENT \'Parent phone call ID (if this is a follow-up item). This is not currently implemented\'
,
PRIMARY KEY ( id )
, INDEX FKEY_source_contact_id ( source_contact_id ) ,
FOREIGN KEY (source_contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_phone_id ( phone_id ) ,
FOREIGN KEY (phone_id) REFERENCES civicrm_phone(id)
, INDEX FKEY_parent_id ( parent_id ) ,
FOREIGN KEY (parent_id) REFERENCES civicrm_phonecall(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_uf_match (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'System generated ID.\',
uf_id int unsigned NOT NULL COMMENT \'UF ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact (cached here for ease of use reasons)\',
email varchar(64) COMMENT \'Email address\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Group ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this group\',
name varchar(64) COMMENT \'Internal name of Group.\',
title varchar(64) COMMENT \'Name of Group.\',
description varchar(255) COMMENT \'Optional verbose description of the group.\',
source varchar(64) COMMENT \'Module or process which created this group.\',
saved_search_id int unsigned COMMENT \'FK to saved search table.\',
is_active tinyint COMMENT \'Is this entry active?\',
visibility enum(\'User and User Admin Only\', \'Public User Pages\', \'Public User Pages and Listings\') DEFAULT \'User and User Admin Only\' COMMENT \'In what context(s) is this field visible.\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_title_domain_id(
title
, domain_id
)
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
, INDEX FKEY_saved_search_id ( saved_search_id ) ,
FOREIGN KEY (saved_search_id) REFERENCES civicrm_saved_search(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_subscription_history (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Internal Id\',
contact_id int unsigned NOT NULL COMMENT \'Contact Id\',
group_id int unsigned COMMENT \'Group Id\',
date datetime NOT NULL COMMENT \'Date of the (un)subscription\',
method enum(\'Admin\', \'Email\', \'Web\', \'API\') COMMENT \'How the (un)subscription was triggered\',
status enum(\'Added\', \'Removed\', \'Pending\') COMMENT \'The state of the contact within the group\',
tracking varchar(255) COMMENT \'IP address or other tracking info\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_group_id ( group_id ) ,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_relationship (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Relationship ID\',
contact_id_a int unsigned NOT NULL COMMENT \'id of the first contact\',
contact_id_b int unsigned NOT NULL COMMENT \'id of the second contact\',
relationship_type_id int unsigned NOT NULL COMMENT \'id of the relationship\',
start_date date COMMENT \'date when the relationship started\',
end_date date COMMENT \'date when the relationship ended\',
is_active tinyint DEFAULT 1 COMMENT \'is the relationship active ?\'
,
PRIMARY KEY ( id )
, INDEX FKEY_contact_id_a ( contact_id_a ) ,
FOREIGN KEY (contact_id_a) REFERENCES civicrm_contact(id)
, INDEX FKEY_contact_id_b ( contact_id_b ) ,
FOREIGN KEY (contact_id_b) REFERENCES civicrm_contact(id)
, INDEX FKEY_relationship_type_id ( relationship_type_id ) ,
FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_subscribe (
id int unsigned NOT NULL AUTO_INCREMENT ,
group_id int unsigned NOT NULL COMMENT \'FK to Group\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact\',
hash varchar(255) NOT NULL COMMENT \'Security hash\',
time_stamp datetime NOT NULL COMMENT \'When this subscription event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_group_id ( group_id ) ,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_confirm (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_subscribe_id int unsigned NOT NULL COMMENT \'FK to civicrm_mailing_event_subscribe\',
time_stamp datetime NOT NULL COMMENT \'When this confirmation event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_subscribe_id ( event_subscribe_id ) ,
FOREIGN KEY (event_subscribe_id) REFERENCES civicrm_mailing_event_subscribe(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_activity (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Other Activity ID\',
source_contact_id int unsigned NOT NULL COMMENT \'Contact ID of person scheduling or logging this Activity. This will generally an authenticated user.\',
activity_type_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
target_entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
target_entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
subject varchar(64) COMMENT \'The subject/purpose of this meeting.\',
scheduled_date_time datetime COMMENT \'Date and time meeting is scheduled to occur.\',
duration_hours int unsigned COMMENT \'Planned or actual duration of meeting - hours.\',
duration_minutes int unsigned COMMENT \'Planned or actual duration of meeting - minutes.\',
location varchar(255) COMMENT \'Where will the meeting be held ?\',
details text COMMENT \'Details about the meeting (agenda, notes, etc).\',
status enum(\'Scheduled\', \'Completed\') COMMENT \'What is the status of this meeting? Completed meeting status results in activity history entry.\',
parent_id int unsigned COMMENT \'Parent meeting ID (if this is a follow-up item). This is not currently implemented\'
,
PRIMARY KEY ( id )
, INDEX FKEY_source_contact_id ( source_contact_id ) ,
FOREIGN KEY (source_contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_activity_type_id ( activity_type_id ) ,
FOREIGN KEY (activity_type_id) REFERENCES civicrm_activity_type(id)
, INDEX FKEY_parent_id ( parent_id ) ,
FOREIGN KEY (parent_id) REFERENCES civicrm_activity(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_activity_history (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'table record id\',
entity_table varchar(64) COMMENT \'physical tablename for entity being tagged, e.g. civicrm_contact\',
entity_id int unsigned NOT NULL COMMENT \'FK to entity table specified in entity_table column\',
activity_type varchar(64) COMMENT \'sortable label for this activity assigned be registering module or user (e.g. Phone Call)\',
module varchar(64) COMMENT \'Display name of module which registered this activity\',
callback varchar(64) COMMENT \'Function to call which will return URL for viewing details\',
activity_id int unsigned NOT NULL COMMENT \'FK to details item - passed to callback\',
activity_summary varchar(255) COMMENT \'brief description of activity for summary display - as populated by registering module\',
activity_date datetime DEFAULT 0 COMMENT \'when did this activity occur\',
relationship_id int unsigned COMMENT \'OPTIONAL FK to civicrm_relationship.id. Which relationship (of this contact) potentially triggered this activity, i.e. he donated because he was a Board Member of Org X / Employee of Org Y\',
group_id int unsigned COMMENT \'OPTIONAL FK to civicrm_group.id. Was this part of a group communication that triggered this activity?\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
, INDEX FKEY_relationship_id ( relationship_id ) ,
FOREIGN KEY (relationship_id) REFERENCES civicrm_relationship(id)
, INDEX FKEY_group_id ( group_id ) ,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_address (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Address ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this address belong to.\',
street_address varchar(96) COMMENT \'Concatenation of all routable street address components (prefix, street number, street name, suffix, unit number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail delivery, etc.).\',
street_number int COMMENT \'Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.\',
street_number_suffix varchar(8) COMMENT \'Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A\',
street_number_predirectional varchar(8) COMMENT \'Directional prefix, e.g. SE Main St, SE is the prefix.\',
street_name varchar(64) COMMENT \'Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.\',
street_type varchar(8) COMMENT \'St, Rd, Dr, etc.\',
street_number_postdirectional varchar(8) COMMENT \'Directional prefix, e.g. Main St S, S is the suffix.\',
street_unit varchar(16) COMMENT \'Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200\',
supplemental_address_1 varchar(96) COMMENT \'Supplemental Address Information, Line 1\',
supplemental_address_2 varchar(96) COMMENT \'Supplemental Address Information, Line 2\',
supplemental_address_3 varchar(96) COMMENT \'Supplemental Address Information, Line 3\',
city varchar(64) COMMENT \'City, Town or Village Name.\',
county_id int unsigned COMMENT \'Which County does this address belong to.\',
state_province_id int unsigned COMMENT \'Which State_Province does this address belong to.\',
postal_code varchar(12) COMMENT \'Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.\',
postal_code_suffix varchar(12) COMMENT \'Store the suffix, like the +4 part in the USPS system.\',
usps_adc varchar(32) COMMENT \'USPS Bulk mailing code.\',
country_id int unsigned COMMENT \'Which Country does this address belong to.\',
geo_coord_id int unsigned COMMENT \'Which Geo_Coord does this address belong to.\',
geo_code_1 float COMMENT \'Latitude or UTM (Universal Transverse Mercator Grid) Northing.\',
geo_code_2 float COMMENT \'Longitude or UTM (Universal Transverse Mercator Grid) Easting.\',
timezone varchar(8) COMMENT \'Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".\',
note varchar(255) COMMENT \'Optional misc info (e.g. delivery instructions) for this address.\'
,
PRIMARY KEY ( id )
, INDEX index_street_name(
street_name
)
, INDEX index_city(
city
)
, INDEX FKEY_location_id ( location_id ) ,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
, INDEX FKEY_county_id ( county_id ) ,
FOREIGN KEY (county_id) REFERENCES civicrm_county(id)
, INDEX FKEY_state_province_id ( state_province_id ) ,
FOREIGN KEY (state_province_id) REFERENCES civicrm_state_province(id)
, INDEX FKEY_country_id ( country_id ) ,
FOREIGN KEY (country_id) REFERENCES civicrm_country(id)
, INDEX FKEY_geo_coord_id ( geo_coord_id ) ,
FOREIGN KEY (geo_coord_id) REFERENCES civicrm_geo_coord(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_email (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Email ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this email belong to.\',
email varchar(64) COMMENT \'Email address\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary email for this contact and location.\',
on_hold tinyint NOT NULL DEFAULT 0 COMMENT \'Is this address on bounce hold?\',
hold_date datetime COMMENT \'When the address went on bounce hold\',
reset_date datetime COMMENT \'When the address bounce status was last reset\'
,
PRIMARY KEY ( id )
, INDEX FKEY_location_id ( location_id ) ,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_im (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique IM ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this IM identifier belong to.\',
name varchar(64) COMMENT \'IM screen name\',
provider_id int unsigned COMMENT \'Which IM Provider does this screen name belong to.\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary IM for this contact and location.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_location_id ( location_id ) ,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
, INDEX FKEY_provider_id ( provider_id ) ,
FOREIGN KEY (provider_id) REFERENCES civicrm_im_provider(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_group_contact (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'primary key\',
group_id int unsigned NOT NULL COMMENT \'FK to civicrm_group\',
contact_id int unsigned NOT NULL COMMENT \'FK to civicrm_contact\',
status enum(\'Added\', \'Removed\', \'Pending\') COMMENT \'status of contact relative to membership in group\',
location_id int unsigned COMMENT \'Optional location to associate with this membership\',
email_id int unsigned COMMENT \'Optional email to associate with this membership\'
,
PRIMARY KEY ( id )
, INDEX FKEY_group_id ( group_id ) ,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
, INDEX FKEY_location_id ( location_id ) ,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
, INDEX FKEY_email_id ( email_id ) ,
FOREIGN KEY (email_id) REFERENCES civicrm_email(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_queue (
id int unsigned NOT NULL AUTO_INCREMENT ,
job_id int unsigned NOT NULL COMMENT \'FK to Job\',
email_id int unsigned NOT NULL COMMENT \'FK to Email\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact\',
hash varchar(255) NOT NULL COMMENT \'Security hash\'
,
PRIMARY KEY ( id )
, INDEX FKEY_job_id ( job_id ) ,
FOREIGN KEY (job_id) REFERENCES civicrm_mailing_job(id)
, INDEX FKEY_email_id ( email_id ) ,
FOREIGN KEY (email_id) REFERENCES civicrm_email(id)
, INDEX FKEY_contact_id ( contact_id ) ,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_bounce (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
bounce_type_id int unsigned COMMENT \'What type of bounce was it?\',
bounce_reason varchar(255) COMMENT \'The reason the email bounced.\',
time_stamp datetime NOT NULL COMMENT \'When this bounce event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_delivered (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
time_stamp datetime NOT NULL COMMENT \'When this delivery event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_forward (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
dest_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue for destination\',
time_stamp datetime NOT NULL COMMENT \'When this forward event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
, INDEX FKEY_dest_queue_id ( dest_queue_id ) ,
FOREIGN KEY (dest_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_opened (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
time_stamp datetime NOT NULL COMMENT \'When this open event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_reply (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
time_stamp datetime NOT NULL COMMENT \'When this reply event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_trackable_url_open (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
trackable_url_id int unsigned NOT NULL COMMENT \'FK to TrackableURL\',
time_stamp datetime NOT NULL COMMENT \'When this trackable URL open occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
, INDEX FKEY_trackable_url_id ( trackable_url_id ) ,
FOREIGN KEY (trackable_url_id) REFERENCES civicrm_mailing_trackable_url(id)
) TYPE=InnoDB ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_unsubscribe (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
org_unsubscribe tinyint NOT NULL COMMENT \'Unsubscribe at org- or group-level\',
time_stamp datetime NOT NULL COMMENT \'When this delivery event occurred.\'
,
PRIMARY KEY ( id )
, INDEX FKEY_event_queue_id ( event_queue_id ) ,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) TYPE=InnoDB ');
//*************************************************************************************************************************
//*************************************************************************************************************************
// Whew, end of create tables from civicrm_40.mysql
}
else if ($mysql_version[1] > 0) {
$mysql_version_confirmed = '4.1';
// Beginning of create tables from civicrm_41.mysql
//*************************************************************************************************************************
//*************************************************************************************************************************
$ret[] = update_sql('CREATE TABLE civicrm_acl (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
deny tinyint NOT NULL DEFAULT 0 COMMENT \'Is this ACL entry Allow (0) or Deny (1) ?\',
entity_table varchar(64) NOT NULL COMMENT \'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)\',
entity_id int unsigned COMMENT \'ID of the object possessing this ACL\',
operation enum(\'View\', \'Edit\', \'Create\', \'Delete\', \'Grant\', \'Revoke\') NOT NULL COMMENT \'What operation does this ACL entry control?\',
object_table varchar(64) COMMENT \'The table of the object controlled by this ACL entry\',
object_id int unsigned COMMENT \'The ID of the object controlled by this ACL entry\',
acl_table varchar(64) COMMENT \'If this is a grant/revoke entry, what table are we granting?\',
acl_id int unsigned COMMENT \'ID of the ACL or ACL group being granted/revoked\'
,
PRIMARY KEY ( id )
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_country (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Country Id\',
name varchar(64) COMMENT \'Country Name\',
iso_code char(2) COMMENT \'ISO Code\',
country_code varchar(4) COMMENT \'National prefix to be used when dialing TO this country.\',
idd_prefix varchar(4) COMMENT \'International direct dialing prefix from within the country TO another country\',
ndd_prefix varchar(4) COMMENT \'Access prefix to call within a country to a different area\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_iso_code(
name
, iso_code
)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_domain (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Domain ID\',
name varchar(64) COMMENT \'Name of Domain / Organization\',
description varchar(255) COMMENT \'Description of Domain.\',
contact_name varchar(64) COMMENT \'Name of the person responsible for this domain\',
email_domain varchar(64) COMMENT \'The domain from which outgoing email for this domain will appear to originate\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name(
name
)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_acl_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this group.\',
is_active tinyint DEFAULT 1 COMMENT \'Is this ACL Group currently active?\',
title varchar(64) COMMENT \'ACL Group Title\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_acl_group_join (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
acl_group_id int unsigned NOT NULL COMMENT \'Foreign Key to ACL Group\',
entity_table varchar(64) NOT NULL COMMENT \'Table of the object joined to the ACL Group (Contact or Group)\',
entity_id int unsigned NOT NULL COMMENT \'ID of the group/contact object being joined\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (acl_group_id) REFERENCES civicrm_acl_group(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_geo_coord (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Geo Coord ID\',
coord_type enum(\'LatLong\', \'Projected\') COMMENT \'Projected or unprojected coordinates - projected coordinates (e.g. UTM) may be treated as cartesian by some modules.\',
coord_units enum(\'Degree\', \'Grad\', \'Radian\', \'Foot\', \'Meter\') COMMENT \'If the coord_type is LATLONG, indicate the unit of angular measure: Degree|Grad|Radian. If the coord_type is Projected, indicate unit of distance measure: Foot|Meter.\',
coord_ogc_wkt_string text COMMENT \'Coordinate sys description in Open GIS Consortium WKT (well known text) format - see http://www.opengeospatial.org/docs/01-009.pdf this is provided for the convenience of the user or third party modules.\'
,
PRIMARY KEY ( id )
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_gender (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Gender ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this gender.\',
name varchar(64) COMMENT \'Gender Name.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls Gender order in the select box.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_im_provider (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'IM Provider ID\',
name varchar(64) COMMENT \'Name of IM Provider.\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
is_reserved tinyint COMMENT \'Is this entry a predefined system option?\',
is_active tinyint COMMENT \'Is this entry active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mapping (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Mapping ID\',
domain_id int unsigned NOT NULL COMMENT \'Domain to which this mapping belongs\',
name varchar(64) COMMENT \'Name of Mapping\',
description varchar(255) COMMENT \'Description of Mapping.\',
mapping_type enum(\'Export\', \'Import\') COMMENT \'Type of Mapping.\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name(
name
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_individual_prefix (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Individual Prefix ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this individual prefix.\',
name varchar(64) COMMENT \'Individual Prefix Name.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls Individual Prefix order in the select box.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_individual_suffix (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Individual Suffix ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this individual suffix.\',
name varchar(64) COMMENT \'Individual Suffix Name.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls Individual Suffix order in the select box.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_location_type (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Location Type ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this location type.\',
name varchar(64) COMMENT \'Location Type Name.\',
vcard_name varchar(4) COMMENT \'vCard Location Type Name.\',
description varchar(255) COMMENT \'Location Type Description.\',
is_reserved tinyint COMMENT \'Is this location type a predefined system location?\',
is_active tinyint COMMENT \'Is this property active?\',
is_default tinyint COMMENT \'Is this location type the default?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mobile_provider (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Mobile Provider ID\',
name varchar(64) COMMENT \'Name of Mobile Provider.\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
is_reserved tinyint COMMENT \'Is this entry a predefined system option?\',
is_active tinyint COMMENT \'Is this entry active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_state_province (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'State / Province ID\',
name varchar(64) COMMENT \'Name of State / Province\',
abbreviation varchar(4) COMMENT \'2-4 Character Abbreviation of State / Province\',
country_id int unsigned NOT NULL COMMENT \'ID of Country that State / Province belong\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_country_id(
name
, country_id
)
,
FOREIGN KEY (country_id) REFERENCES civicrm_country(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_tag (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Tag ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this tag\',
name varchar(64) COMMENT \'Name of Tag.\',
description varchar(255) COMMENT \'Optional verbose description of the tag.\',
parent_id int unsigned DEFAULT NULL COMMENT \'Optional parent id for this tag.\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
,
FOREIGN KEY (parent_id) REFERENCES civicrm_tag(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_uf_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this form.\',
is_active tinyint DEFAULT 1 COMMENT \'Is this form currently active? If false, hide all related fields for all sharing contexts.\',
form_type enum(\'CiviCRM Profile\') COMMENT \'Type of form.\',
title varchar(64) COMMENT \'Form title.\',
help_pre text COMMENT \'Description and/or help text to display before fields in form.\',
help_post text COMMENT \'Description and/or help text to display after fields in form.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls display order when multiple user framework groups are setup for concurrent display.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_uf_field (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique table ID\',
uf_group_id int unsigned NOT NULL COMMENT \'Which form does this field belong to.\',
field_name varchar(64) COMMENT \'Name for CiviCRM field which is being exposed for sharing.\',
is_active tinyint DEFAULT 1 COMMENT \'Is this field currently shareable? If false, hide the field for all sharing contexts.\',
is_view tinyint DEFAULT 0 COMMENT \'the field is view only and not editable in user forms.\',
is_required tinyint DEFAULT 0 COMMENT \'Is this field required when included in a user or registration form?\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls field display order when user framework fields are displayed in registration and account editing forms.\',
help_post text COMMENT \'Description and/or help text to display after this field.\',
is_registration tinyint DEFAULT 0 COMMENT \'Is this field included in new user registration forms?\',
is_match tinyint DEFAULT 0 COMMENT \'Is this field part of the key for matching users to contacts?\',
visibility enum(\'User and User Admin Only\', \'Public User Pages\', \'Public User Pages and Listings\') DEFAULT \'User and User Admin Only\' COMMENT \'In what context(s) is this field visible.\',
in_selector tinyint DEFAULT 0 COMMENT \'Is this field included as a column in the selector table?\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_validation (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Validation ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
type enum(\'Email\', \'Money\', \'URL\', \'Phone\', \'Positive Integer\', \'Variable Name\', \'Range\', \'Regular Expression Match\', \'Regular Expression No Match\') COMMENT \'List of rule built-in rule types. custom types may be added to ENUM via directory scan.\',
parameters varchar(255) COMMENT \'optional value(s) passed to validation function, e.g. a regular expression, min and max for Range, operator + number for Comparison type, etc.\',
function_name varchar(128) COMMENT \'custom validation function name. Class methods should be invoked using php syntax array(CLASS_NAME, FN_NAME)\',
description varchar(255) COMMENT \'Rule Description.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_contact (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Contact ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
contact_type enum(\'Individual\', \'Organization\', \'Household\') COMMENT \'Type of Contact.\',
legal_identifier varchar(32) COMMENT \'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.\',
external_identifier varchar(32) COMMENT \'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.\',
sort_name varchar(128) COMMENT \'Name used for sorting different contact types\',
display_name varchar(128) COMMENT \'Formatted name representing preferred format for display/print/other output.\',
nick_name varchar(128) COMMENT \'Nick Name.\',
home_URL varchar(128) COMMENT \'optional "home page" URL for this contact.\',
image_URL varchar(128) COMMENT \'optional URL for preferred image (photo, logo, etc.) to display for this contact.\',
source varchar(255) COMMENT \'where domain_id contact come from, e.g. import, donate module insert...\',
preferred_communication_method enum(\'Phone\', \'Email\', \'Post\') COMMENT \'What is the preferred mode of communication.\',
preferred_mail_format enum(\'Text\', \'HTML\', \'Both\') DEFAULT "Text" COMMENT \'What is the preferred mode of sending an email.\',
do_not_phone tinyint DEFAULT 0 ,
do_not_email tinyint DEFAULT 0 ,
do_not_mail tinyint DEFAULT 0 ,
do_not_trade tinyint DEFAULT 0 ,
hash int unsigned NOT NULL COMMENT \'Key for validating requests related to this contact.\',
is_opt_out tinyint NOT NULL DEFAULT 0 COMMENT \'Has the contact opted out from the org?\'
,
PRIMARY KEY ( id )
, INDEX index_sort_name(
sort_name
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_household (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Household ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
household_name varchar(128) COMMENT \'Household Name.\',
primary_contact_id int unsigned COMMENT \'Optional FK to Primary Contact for this household.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (primary_contact_id) REFERENCES civicrm_contact(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_individual (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Individual ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
first_name varchar(64) COMMENT \'First Name.\',
middle_name varchar(64) COMMENT \'Middle Name.\',
last_name varchar(64) COMMENT \'Last Name.\',
prefix_id int unsigned COMMENT \'Prefix or Title for name (Ms, Mr...). FK to prefix ID\',
suffix_id int unsigned COMMENT \'Suffix for name (Jr, Sr...). FK to suffix ID\',
greeting_type enum(\'Formal\', \'Informal\', \'Honorific\', \'Custom\', \'Other\') COMMENT \'Preferred greeting format.\',
custom_greeting varchar(128) COMMENT \'Custom greeting message.\',
job_title varchar(64) COMMENT \'Job Title\',
gender_id int unsigned COMMENT \'FK to gender ID\',
birth_date date COMMENT \'Date of birth\',
is_deceased tinyint DEFAULT 0 ,
phone_to_household_id int unsigned COMMENT \'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.\',
email_to_household_id int unsigned COMMENT \'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.\',
mail_to_household_id int unsigned COMMENT \'OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (prefix_id) REFERENCES civicrm_individual_prefix(id)
,
FOREIGN KEY (suffix_id) REFERENCES civicrm_individual_suffix(id)
,
FOREIGN KEY (gender_id) REFERENCES civicrm_gender(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_organization (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Organization ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
organization_name varchar(128) COMMENT \'Organization Name.\',
legal_name varchar(128) COMMENT \'Legal Name.\',
sic_code varchar(8) COMMENT \'Standard Industry Classification Code.\',
primary_contact_id int unsigned COMMENT \'Optional FK to Primary Contact for this organization.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (primary_contact_id) REFERENCES civicrm_contact(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_relationship_type (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Primary key\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
name_a_b varchar(64) COMMENT \'name/label for relationship of contact_a to contact_b.\',
name_b_a varchar(64) COMMENT \'Optional name/label for relationship of contact_b to contact_a.\',
description varchar(255) COMMENT \'Optional verbose description of the relationship type.\',
contact_type_a enum(\'Individual\', \'Organization\', \'Household\') COMMENT \'If defined, contact_a in a relationship of this type must be a specific contact_type.\',
contact_type_b enum(\'Individual\', \'Organization\', \'Household\') COMMENT \'If defined, contact_b in a relationship of this type must be a specific contact_type.\',
is_reserved tinyint COMMENT \'Is this relationship type a predefined system type (can not be changed or de-activated)?\',
is_active tinyint DEFAULT 1 COMMENT \'Is this relationship type currently active (i.e. can be used when creating or editing relationships)?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_a_b_domain_id(
name_a_b
, domain_id
)
, UNIQUE INDEX UI_name_b_a_domain_id(
name_b_a
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_saved_search (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Saved search ID\',
domain_id int unsigned NOT NULL COMMENT \'which organization/domain owns this search\',
query text COMMENT \'SQL query for this search\',
form_values text COMMENT \'Submitted form values for this search\',
is_active tinyint COMMENT \'Is this entry active?\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_component (
id int unsigned NOT NULL AUTO_INCREMENT ,
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this component\',
name varchar(64) COMMENT \'The name of this component\',
component_type enum(\'Header\', \'Footer\', \'Subscribe\', \'Welcome\', \'Unsubscribe\', \'OptOut\', \'Reply\') COMMENT \'Type of Component.\',
subject varchar(255) ,
body_html text COMMENT \'Body of the component in html format.\',
body_text text COMMENT \'Body of the component in text format.\',
is_default tinyint DEFAULT 0 COMMENT \'Is this the default component for this component_type?\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing (
id int unsigned NOT NULL AUTO_INCREMENT ,
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this mailing\',
header_id int unsigned NOT NULL COMMENT \'FK to the header component.\',
footer_id int unsigned NOT NULL COMMENT \'FK to the footer component.\',
reply_id int unsigned NOT NULL COMMENT \'FK to the auto-responder component.\',
unsubscribe_id int unsigned NOT NULL COMMENT \'FK to the unsubscribe component.\',
optout_id int unsigned NOT NULL COMMENT \'FK to the opt-out component.\',
name varchar(128) COMMENT \'Mailing Name.\',
from_name varchar(128) COMMENT \'From Header of mailing\',
from_email varchar(128) COMMENT \'From Email of mailing\',
replyto_email varchar(128) COMMENT \'Reply-To Email of mailing\',
subject varchar(128) COMMENT \'Subject of mailing\',
body_text text COMMENT \'Body of the mailing in text format.\',
body_html text COMMENT \'Body of the mailing in html format.\',
is_template tinyint COMMENT \'Is this object a mailing template?\',
url_tracking tinyint COMMENT \'Should we track URL click-throughs for this mailing?\',
forward_replies tinyint COMMENT \'Should we forward replies back to the author?\',
auto_responder tinyint COMMENT \'Should we enable the auto-responder?\',
open_tracking tinyint COMMENT \'Should we track when recipients open/read this mailing?\',
is_completed tinyint COMMENT \'Has at least one job associated with this mailing finished?\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
,
FOREIGN KEY (header_id) REFERENCES civicrm_mailing_component(id)
,
FOREIGN KEY (footer_id) REFERENCES civicrm_mailing_component(id)
,
FOREIGN KEY (reply_id) REFERENCES civicrm_mailing_component(id)
,
FOREIGN KEY (unsubscribe_id) REFERENCES civicrm_mailing_component(id)
,
FOREIGN KEY (optout_id) REFERENCES civicrm_mailing_component(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_group (
id int unsigned NOT NULL AUTO_INCREMENT ,
mailing_id int unsigned NOT NULL COMMENT \'The ID of a previous mailing to include/exclude recipients.\',
group_type enum(\'Include\', \'Exclude\') COMMENT \'Are the members of the group included or excluded?.\',
entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_trackable_url (
id int unsigned NOT NULL AUTO_INCREMENT ,
url varchar(255) NOT NULL COMMENT \'The URL to be tracked.\',
mailing_id int unsigned NOT NULL COMMENT \'FK to the mailing\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_job (
id int unsigned NOT NULL AUTO_INCREMENT ,
mailing_id int unsigned NOT NULL COMMENT \'The ID of the mailing this Job will send.\',
scheduled_date datetime COMMENT \'date on which this job was scheduled.\',
start_date datetime COMMENT \'date on which this job was started.\',
end_date datetime COMMENT \'date on which this job ended.\',
status enum(\'Scheduled\', \'Running\', \'Complete\', \'Paused\', \'Canceled\') COMMENT \'The state of this job\',
is_retry tinyint COMMENT \'Is this job a retry?\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_bounce_type (
id int unsigned NOT NULL AUTO_INCREMENT ,
name enum(\'AOL\', \'Away\', \'DNS\', \'Host\', \'Inactive\', \'Invalid\', \'Loop\', \'Quota\', \'Relay\', \'Spam\', \'Syntax\', \'Unknown\') NOT NULL COMMENT \'Type of bounce\',
description varchar(255) COMMENT \'A description of this bounce type\',
hold_threshold int unsigned NOT NULL COMMENT \'Number of bounces of this type required before the email address is put on bounce hold\'
,
PRIMARY KEY ( id )
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_bounce_pattern (
id int unsigned NOT NULL AUTO_INCREMENT ,
bounce_type_id int unsigned NOT NULL COMMENT \'Type of bounce\',
pattern varchar(255) COMMENT \'A regexp to match a message to a bounce type\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (bounce_type_id) REFERENCES civicrm_mailing_bounce_type(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_donation_page (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Donation Page Id\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
is_active tinyint COMMENT \'Is this property active?\',
name varchar(64) COMMENT \'Donation Page Name\',
description varchar(255) COMMENT \'Description\',
intro_title varchar(64) COMMENT \'Introduction Title\',
intro_description varchar(255) COMMENT \'Introduction Description\',
anonymous tinyint COMMENT \'Allow anonymous donations for this page ?\'
,
PRIMARY KEY ( id )
, INDEX index_name(
name
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_activity_type (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Activity Type ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this activity type.\',
name varchar(64) COMMENT \'Activity Type Name.\',
description varchar(255) COMMENT \'Activity Type Description.\',
is_reserved tinyint COMMENT \'Is this activity type a predefined system activity?\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_county (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'County ID\',
name varchar(64) COMMENT \'Name of County\',
abbreviation varchar(4) COMMENT \'2-4 Character Abbreviation of County\',
state_province_id int unsigned NOT NULL COMMENT \'ID of State / Province that County belongs\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_name_state_id(
name
, state_province_id
)
,
FOREIGN KEY (state_province_id) REFERENCES civicrm_state_province(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Custom Group ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact\',
name varchar(64) COMMENT \'Variable name/programmatic handle for this group.\',
title varchar(64) COMMENT \'Friendly Name.\',
extends enum(\'Contact\', \'Individual\', \'Household\', \'Organization\', \'Location\', \'Address\') DEFAULT \'Contact\' COMMENT \'Type of object this group extends (can add other options later e.g. contact_address, etc.).\',
style enum(\'Tab\', \'Inline\') COMMENT \'Visual relationship between this form and its parent.\',
collapse_display int unsigned DEFAULT 0 COMMENT \'Will this group be in collapsed or expanded mode on initial display ?\',
help_pre text COMMENT \'Description and/or help text to display before fields in form.\',
help_post text COMMENT \'Description and/or help text to display after fields in form.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls display order when multiple extended property groups are setup for the same class.\',
is_active tinyint COMMENT \'Is this property active?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_title_domain_id(
title
, domain_id
)
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_field (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Custom Field ID\',
custom_group_id int unsigned NOT NULL COMMENT \'FK to civicrm_custom_group.\',
name varchar(64) COMMENT \'Variable name/programmatic handle for this property.\',
label varchar(64) COMMENT \'Text for form field label (also friendly name for administering this custom property).\',
data_type enum(\'String\', \'Int\', \'Float\', \'Money\', \'Memo\', \'Date\', \'Boolean\', \'StateProvince\', \'Country\') COMMENT \'Controls location of data storage in extended_data table.\',
html_type enum(\'Text\', \'TextArea\', \'Select\', \'Radio\', \'CheckBox\', \'Select Date\', \'Select State/Province\', \'Select Country\') COMMENT \'HTML types plus several built-in extended types.\',
default_value varchar(255) COMMENT \'Use form_options.is_default for field_types which use options.\',
is_required tinyint COMMENT \'Is a value required for this property.\',
is_searchable tinyint COMMENT \'Is this property searchable.\',
weight int NOT NULL DEFAULT 1 COMMENT \'Controls field display order within an extended property group.\',
validation_id int unsigned COMMENT \'FK to civicrm_validation. Will be used for custom validation functions.\',
help_pre text COMMENT \'Description and/or help text to display before this field.\',
help_post text COMMENT \'Description and/or help text to display after this field.\',
mask varchar(64) COMMENT \'Optional format instructions for specific field types, like date types.\',
attributes varchar(255) COMMENT \'Store collection of type-appropriate attributes, e.g. textarea needs rows/cols attributes\',
javascript varchar(255) COMMENT \'Optional scripting attributes for field.\',
is_active tinyint COMMENT \'Is this property active?\',
options_per_line int unsigned COMMENT \'number of options per line for checkbox and radio\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_label_custom_group_id(
label
, custom_group_id
)
,
FOREIGN KEY (custom_group_id) REFERENCES civicrm_custom_group(id)
,
FOREIGN KEY (validation_id) REFERENCES civicrm_validation(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_option (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Custom Option ID\',
custom_field_id int unsigned NOT NULL COMMENT \'FK to civicrm_custom_field.\',
label varchar(64) COMMENT \'Label for option\',
value varchar(64) COMMENT \'Value of the option (when form is submitted)\',
weight int NOT NULL DEFAULT 1 COMMENT \'Order in which the options are displayed\',
is_active tinyint COMMENT \'Is this option active ?\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_label_custom_field_id(
value
, custom_field_id
)
,
FOREIGN KEY (custom_field_id) REFERENCES civicrm_custom_field(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_custom_value (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique ID\',
custom_field_id int unsigned NOT NULL COMMENT \'Foreign key to civicrm_ext_property.\',
entity_table varchar(64) COMMENT \'physical tablename for entity being extended by this data, e.g. civicrm_contact\',
entity_id int unsigned NOT NULL COMMENT \'FK to record in the entity table specified by entity_table column.\',
int_data int COMMENT \'stores data for ext property data_type = integer. This col supports signed integers.\',
float_data float COMMENT \'stores data for ext property data_type = float.\',
decimal_data decimal(20,2) COMMENT \'stores data for ext property data_type = money.\',
char_data varchar(255) COMMENT \'data for ext property data_type = text.\',
date_data date COMMENT \'data for ext property data_type = date.\',
memo_data text COMMENT \'data for ext property data_type = memo.\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
,
FOREIGN KEY (custom_field_id) REFERENCES civicrm_custom_field(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_email_history (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Email History ID\',
subject varchar(255) COMMENT \'Subject of the email.\',
message text COMMENT \'Contents of the email.\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact who is sending this email\',
sent_date date COMMENT \'When was this email sent\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_entity_tag (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'primary key\',
entity_table varchar(64) COMMENT \'physical tablename for entity being tagged, e.g. civicrm_contact\',
entity_id int unsigned NOT NULL COMMENT \'FK to entity table specified in entity_table column.\',
tag_id int unsigned NOT NULL COMMENT \'FK to civicrm_tag\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
,
FOREIGN KEY (tag_id) REFERENCES civicrm_tag(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mapping_field (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Mapping Field ID\',
mapping_id int unsigned NOT NULL COMMENT \'Mapping to which this field belongs\',
name varchar(64) COMMENT \'Mapping field key\',
contact_type varchar(64) COMMENT \'Contact Type in mapping\',
column_number int unsigned NOT NULL COMMENT \'Column number for mapping set\',
location_type_id int unsigned COMMENT \'Location type of this mapping, if required\',
phone_type varchar(64) COMMENT \'Phone type, if required\',
relationship_type_id int unsigned COMMENT \'Relationship type, if required\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (mapping_id) REFERENCES civicrm_mapping(id)
,
FOREIGN KEY (location_type_id) REFERENCES civicrm_location_type(id)
,
FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_location (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Location ID\',
entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
location_type_id int unsigned NOT NULL COMMENT \'FK to Location Type ID\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary location for the contact. (allow only ONE primary location / contact.)\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
, INDEX index_entity_location_type(
entity_table
, entity_id
, location_type_id
)
,
FOREIGN KEY (location_type_id) REFERENCES civicrm_location_type(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_meeting (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Meeting ID\',
source_contact_id int unsigned NOT NULL COMMENT \'Contact ID of person scheduling or logging this meeting. This will generally an authenticated user.\',
target_entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
target_entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
subject varchar(64) COMMENT \'The subject/purpose of this meeting.\',
scheduled_date_time datetime COMMENT \'Date and time meeting is scheduled to occur.\',
duration_hours int unsigned COMMENT \'Planned or actual duration of meeting - hours.\',
duration_minutes int unsigned COMMENT \'Planned or actual duration of meeting - minutes.\',
location varchar(255) COMMENT \'Where will the meeting be held ?\',
details text COMMENT \'Details about the meeting (agenda, notes, etc).\',
status enum(\'Scheduled\', \'Completed\') COMMENT \'What is the status of this meeting? Completed meeting status results in activity history entry.\',
parent_id int unsigned COMMENT \'Parent meeting ID (if this is a follow-up item). This is not currently implemented\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (source_contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (parent_id) REFERENCES civicrm_meeting(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_note (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Note ID\',
entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
note text COMMENT \'Note and/or Comment.\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID creator\',
modified_date date COMMENT \'When was this note last modified/edited\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_phone (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Phone ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this phone belong to.\',
phone varchar(32) COMMENT \'Complete phone number.\',
phone_type enum(\'Phone\', \'Mobile\', \'Fax\', \'Pager\') COMMENT \'What type of telecom device is this.\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary phone for this contact and location.\',
mobile_provider_id int unsigned COMMENT \'Which Mobile Provider does this phone belong to.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
,
FOREIGN KEY (mobile_provider_id) REFERENCES civicrm_mobile_provider(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_phonecall (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Phone call ID\',
source_contact_id int unsigned NOT NULL COMMENT \'Contact ID of person making the call. This will generally an authenticated user.\',
target_entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
target_entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
subject varchar(64) COMMENT \'Short description of the subject of this call.\',
scheduled_date_time datetime COMMENT \'Date and time phonecall is scheduled to be made.\',
duration_hours int unsigned COMMENT \'Planned or actual duration of call - hours.\',
duration_minutes int unsigned COMMENT \'Planned or actual duration of call - minutes.\',
phone_id int unsigned COMMENT \'Phone ID of the number called (optional - used if an existing phone number is selected).\',
phone_number varchar(64) COMMENT \'Phone number in case the number does not exist in the civicrm_phone table.\',
details text COMMENT \'Details about the call.\',
status enum(\'Scheduled\', \'Left Message\', \'Unreachable\', \'Completed\') COMMENT \'What is the status of this phone call? Completed calls result in activity history entry.\',
parent_id int unsigned COMMENT \'Parent phone call ID (if this is a follow-up item). This is not currently implemented\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (source_contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (phone_id) REFERENCES civicrm_phone(id)
,
FOREIGN KEY (parent_id) REFERENCES civicrm_phonecall(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_uf_match (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'System generated ID.\',
uf_id int unsigned NOT NULL COMMENT \'UF ID\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this contact (cached here for ease of use reasons)\',
email varchar(64) COMMENT \'Email address\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_group (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Group ID\',
domain_id int unsigned NOT NULL COMMENT \'Which Domain owns this group\',
name varchar(64) COMMENT \'Internal name of Group.\',
title varchar(64) COMMENT \'Name of Group.\',
description varchar(255) COMMENT \'Optional verbose description of the group.\',
source varchar(64) COMMENT \'Module or process which created this group.\',
saved_search_id int unsigned COMMENT \'FK to saved search table.\',
is_active tinyint COMMENT \'Is this entry active?\',
visibility enum(\'User and User Admin Only\', \'Public User Pages\', \'Public User Pages and Listings\') DEFAULT \'User and User Admin Only\' COMMENT \'In what context(s) is this field visible.\'
,
PRIMARY KEY ( id )
, UNIQUE INDEX UI_title_domain_id(
title
, domain_id
)
, UNIQUE INDEX UI_name_domain_id(
name
, domain_id
)
,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
,
FOREIGN KEY (saved_search_id) REFERENCES civicrm_saved_search(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_subscription_history (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Internal Id\',
contact_id int unsigned NOT NULL COMMENT \'Contact Id\',
group_id int unsigned COMMENT \'Group Id\',
date datetime NOT NULL COMMENT \'Date of the (un)subscription\',
method enum(\'Admin\', \'Email\', \'Web\', \'API\') COMMENT \'How the (un)subscription was triggered\',
status enum(\'Added\', \'Removed\', \'Pending\') COMMENT \'The state of the contact within the group\',
tracking varchar(255) COMMENT \'IP address or other tracking info\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_relationship (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Relationship ID\',
contact_id_a int unsigned NOT NULL COMMENT \'id of the first contact\',
contact_id_b int unsigned NOT NULL COMMENT \'id of the second contact\',
relationship_type_id int unsigned NOT NULL COMMENT \'id of the relationship\',
start_date date COMMENT \'date when the relationship started\',
end_date date COMMENT \'date when the relationship ended\',
is_active tinyint DEFAULT 1 COMMENT \'is the relationship active ?\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (contact_id_a) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (contact_id_b) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_subscribe (
id int unsigned NOT NULL AUTO_INCREMENT ,
group_id int unsigned NOT NULL COMMENT \'FK to Group\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact\',
hash varchar(255) NOT NULL COMMENT \'Security hash\',
time_stamp datetime NOT NULL COMMENT \'When this subscription event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_confirm (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_subscribe_id int unsigned NOT NULL COMMENT \'FK to civicrm_mailing_event_subscribe\',
time_stamp datetime NOT NULL COMMENT \'When this confirmation event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_subscribe_id) REFERENCES civicrm_mailing_event_subscribe(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_activity (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Other Activity ID\',
source_contact_id int unsigned NOT NULL COMMENT \'Contact ID of person scheduling or logging this Activity. This will generally an authenticated user.\',
activity_type_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
target_entity_table varchar(64) NOT NULL COMMENT \'Name of table where item being referenced is stored.\',
target_entity_id int unsigned NOT NULL COMMENT \'Foreign key to the referenced item.\',
subject varchar(64) COMMENT \'The subject/purpose of this meeting.\',
scheduled_date_time datetime COMMENT \'Date and time meeting is scheduled to occur.\',
duration_hours int unsigned COMMENT \'Planned or actual duration of meeting - hours.\',
duration_minutes int unsigned COMMENT \'Planned or actual duration of meeting - minutes.\',
location varchar(255) COMMENT \'Where will the meeting be held ?\',
details text COMMENT \'Details about the meeting (agenda, notes, etc).\',
status enum(\'Scheduled\', \'Completed\') COMMENT \'What is the status of this meeting? Completed meeting status results in activity history entry.\',
parent_id int unsigned COMMENT \'Parent meeting ID (if this is a follow-up item). This is not currently implemented\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (source_contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (activity_type_id) REFERENCES civicrm_activity_type(id)
,
FOREIGN KEY (parent_id) REFERENCES civicrm_activity(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_activity_history (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'table record id\',
entity_table varchar(64) COMMENT \'physical tablename for entity being tagged, e.g. civicrm_contact\',
entity_id int unsigned NOT NULL COMMENT \'FK to entity table specified in entity_table column\',
activity_type varchar(64) COMMENT \'sortable label for this activity assigned be registering module or user (e.g. Phone Call)\',
module varchar(64) COMMENT \'Display name of module which registered this activity\',
callback varchar(64) COMMENT \'Function to call which will return URL for viewing details\',
activity_id int unsigned NOT NULL COMMENT \'FK to details item - passed to callback\',
activity_summary varchar(255) COMMENT \'brief description of activity for summary display - as populated by registering module\',
activity_date datetime DEFAULT 0 COMMENT \'when did this activity occur\',
relationship_id int unsigned COMMENT \'OPTIONAL FK to civicrm_relationship.id. Which relationship (of this contact) potentially triggered this activity, i.e. he donated because he was a Board Member of Org X / Employee of Org Y\',
group_id int unsigned COMMENT \'OPTIONAL FK to civicrm_group.id. Was this part of a group communication that triggered this activity?\'
,
PRIMARY KEY ( id )
, INDEX index_entity(
entity_table
, entity_id
)
,
FOREIGN KEY (relationship_id) REFERENCES civicrm_relationship(id)
,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_address (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Address ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this address belong to.\',
street_address varchar(96) COMMENT \'Concatenation of all routable street address components (prefix, street number, street name, suffix, unit number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail delivery, etc.).\',
street_number int COMMENT \'Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.\',
street_number_suffix varchar(8) COMMENT \'Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A\',
street_number_predirectional varchar(8) COMMENT \'Directional prefix, e.g. SE Main St, SE is the prefix.\',
street_name varchar(64) COMMENT \'Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.\',
street_type varchar(8) COMMENT \'St, Rd, Dr, etc.\',
street_number_postdirectional varchar(8) COMMENT \'Directional prefix, e.g. Main St S, S is the suffix.\',
street_unit varchar(16) COMMENT \'Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200\',
supplemental_address_1 varchar(96) COMMENT \'Supplemental Address Information, Line 1\',
supplemental_address_2 varchar(96) COMMENT \'Supplemental Address Information, Line 2\',
supplemental_address_3 varchar(96) COMMENT \'Supplemental Address Information, Line 3\',
city varchar(64) COMMENT \'City, Town or Village Name.\',
county_id int unsigned COMMENT \'Which County does this address belong to.\',
state_province_id int unsigned COMMENT \'Which State_Province does this address belong to.\',
postal_code varchar(12) COMMENT \'Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.\',
postal_code_suffix varchar(12) COMMENT \'Store the suffix, like the +4 part in the USPS system.\',
usps_adc varchar(32) COMMENT \'USPS Bulk mailing code.\',
country_id int unsigned COMMENT \'Which Country does this address belong to.\',
geo_coord_id int unsigned COMMENT \'Which Geo_Coord does this address belong to.\',
geo_code_1 float COMMENT \'Latitude or UTM (Universal Transverse Mercator Grid) Northing.\',
geo_code_2 float COMMENT \'Longitude or UTM (Universal Transverse Mercator Grid) Easting.\',
timezone varchar(8) COMMENT \'Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".\',
note varchar(255) COMMENT \'Optional misc info (e.g. delivery instructions) for this address.\'
,
PRIMARY KEY ( id )
, INDEX index_street_name(
street_name
)
, INDEX index_city(
city
)
,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
,
FOREIGN KEY (county_id) REFERENCES civicrm_county(id)
,
FOREIGN KEY (state_province_id) REFERENCES civicrm_state_province(id)
,
FOREIGN KEY (country_id) REFERENCES civicrm_country(id)
,
FOREIGN KEY (geo_coord_id) REFERENCES civicrm_geo_coord(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_email (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique Email ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this email belong to.\',
email varchar(64) COMMENT \'Email address\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary email for this contact and location.\',
on_hold tinyint NOT NULL DEFAULT 0 COMMENT \'Is this address on bounce hold?\',
hold_date datetime COMMENT \'When the address went on bounce hold\',
reset_date datetime COMMENT \'When the address bounce status was last reset\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_im (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'Unique IM ID\',
location_id int unsigned NOT NULL COMMENT \'Which Location does this IM identifier belong to.\',
name varchar(64) COMMENT \'IM screen name\',
provider_id int unsigned COMMENT \'Which IM Provider does this screen name belong to.\',
is_primary tinyint DEFAULT 0 COMMENT \'Is this the primary IM for this contact and location.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
,
FOREIGN KEY (provider_id) REFERENCES civicrm_im_provider(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_group_contact (
id int unsigned NOT NULL AUTO_INCREMENT COMMENT \'primary key\',
group_id int unsigned NOT NULL COMMENT \'FK to civicrm_group\',
contact_id int unsigned NOT NULL COMMENT \'FK to civicrm_contact\',
status enum(\'Added\', \'Removed\', \'Pending\') COMMENT \'status of contact relative to membership in group\',
location_id int unsigned COMMENT \'Optional location to associate with this membership\',
email_id int unsigned COMMENT \'Optional email to associate with this membership\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (group_id) REFERENCES civicrm_group(id)
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
,
FOREIGN KEY (location_id) REFERENCES civicrm_location(id)
,
FOREIGN KEY (email_id) REFERENCES civicrm_email(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_queue (
id int unsigned NOT NULL AUTO_INCREMENT ,
job_id int unsigned NOT NULL COMMENT \'FK to Job\',
email_id int unsigned NOT NULL COMMENT \'FK to Email\',
contact_id int unsigned NOT NULL COMMENT \'FK to Contact\',
hash varchar(255) NOT NULL COMMENT \'Security hash\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (job_id) REFERENCES civicrm_mailing_job(id)
,
FOREIGN KEY (email_id) REFERENCES civicrm_email(id)
,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_bounce (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
bounce_type_id int unsigned COMMENT \'What type of bounce was it?\',
bounce_reason varchar(255) COMMENT \'The reason the email bounced.\',
time_stamp datetime NOT NULL COMMENT \'When this bounce event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_delivered (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
time_stamp datetime NOT NULL COMMENT \'When this delivery event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_forward (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
dest_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue for destination\',
time_stamp datetime NOT NULL COMMENT \'When this forward event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
,
FOREIGN KEY (dest_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_opened (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
time_stamp datetime NOT NULL COMMENT \'When this open event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_reply (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
time_stamp datetime NOT NULL COMMENT \'When this reply event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_trackable_url_open (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
trackable_url_id int unsigned NOT NULL COMMENT \'FK to TrackableURL\',
time_stamp datetime NOT NULL COMMENT \'When this trackable URL open occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
,
FOREIGN KEY (trackable_url_id) REFERENCES civicrm_mailing_trackable_url(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
$ret[] = update_sql('CREATE TABLE civicrm_mailing_event_unsubscribe (
id int unsigned NOT NULL AUTO_INCREMENT ,
event_queue_id int unsigned NOT NULL COMMENT \'FK to EventQueue\',
org_unsubscribe tinyint NOT NULL COMMENT \'Unsubscribe at org- or group-level\',
time_stamp datetime NOT NULL COMMENT \'When this delivery event occurred.\'
,
PRIMARY KEY ( id )
,
FOREIGN KEY (event_queue_id) REFERENCES civicrm_mailing_event_queue(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ');
//*************************************************************************************************************************
//*************************************************************************************************************************
// Whew, end of create tables from civicrm_41.mysql
}
// Now we populate the tables with the necessary data from the civicrm_data.mysql file
//***************************************************************************************************************************
//***************************************************************************************************************************
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1001", "Afghanistan", "AF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1002", "Albania", "AL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1003", "Algeria", "DZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1004", "American Samoa", "AS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1005", "Andorra", "AD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1006", "Angola", "AO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1007", "Anguilla", "AI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1008", "Antarctica", "AQ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1009", "Antigua and Barbuda", "AG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1010", "Argentina", "AR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1011", "Armenia", "AM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1012", "Aruba", "AW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1013", "Australia", "AU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1014", "Austria", "AT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1015", "Azerbaijan", "AZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1016", "Bahrain", "BH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1017", "Bangladesh", "BD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1018", "Barbados", "BB")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1019", "Belarus", "BY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1020", "Belgium", "BE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1021", "Belize", "BZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1022", "Benin", "BJ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1023", "Bermuda", "BM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1024", "Bhutan", "BT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1025", "Bolivia", "BO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1026", "Bosnia and Herzegovina", "BA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1027", "Botswana", "BW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1028", "Bouvet Island", "BV")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1029", "Brazil", "BR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1030", "British Indian Ocean Territory", "IO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1031", "Virgin Islands, British", "VG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1032", "Brunei Darussalam", "BN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1033", "Bulgaria", "BG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1034", "Burkina Faso", "BF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1035", "Myanmar", "MM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1036", "Burundi", "BI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1037", "Cambodia", "KH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1038", "Cameroon", "CM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1039", "Canada", "CA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1040", "Cape Verde", "CV")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1041", "Cayman Islands", "KY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1042", "Central African Republic", "CF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1043", "Chad", "TD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1044", "Chile", "CL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1045", "China", "CN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1046", "Christmas Island", "CX")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1047", "Cocos (Keeling) Islands", "CC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1048", "Colombia", "CO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1049", "Comoros", "KM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1050", "Congo, The Democratic Republic of the", "CD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1051", "Congo", "CG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1052", "Cook Islands", "CK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1053", "Costa Rica", "CR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1054", "Côte d\'Ivoire", "CI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1055", "Croatia", "HR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1056", "Cuba", "CU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1057", "Cyprus", "CY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1058", "Czech Republic", "CZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1059", "Denmark", "DK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1060", "Djibouti", "DJ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1061", "Dominica", "DM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1062", "Dominican Republic", "DO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1063", "Timor-Leste", "TL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1064", "Ecuador", "EC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1065", "Egypt", "EG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1066", "El Salvador", "SV")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1067", "Equatorial Guinea", "GQ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1068", "Eritrea", "ER")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1069", "Estonia", "EE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1070", "Ethiopia", "ET")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1072", "Falkland Islands (Malvinas)", "FK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1073", "Faroe Islands", "FO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1074", "Fiji", "FJ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1075", "Finland", "FI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1076", "France", "FR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1077", "French Guiana", "GF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1078", "French Polynesia", "PF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1079", "French Southern Territories", "TF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1080", "Gabon", "GA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1081", "Georgia", "GE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1082", "Germany", "DE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1083", "Ghana", "GH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1084", "Gibraltar", "GI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1085", "Greece", "GR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1086", "Greenland", "GL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1087", "Grenada", "GD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1088", "Guadeloupe", "GP")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1089", "Guam", "GU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1090", "Guatemala", "GT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1091", "Guinea", "GN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1092", "Guinea-Bissau", "GW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1093", "Guyana", "GY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1094", "Haiti", "HT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1095", "Heard Island and McDonald Islands", "HM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1096", "Holy See (Vatican City State)", "VA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1097", "Honduras", "HN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1098", "Hong Kong", "HK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1099", "Hungary", "HU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1100", "Iceland", "IS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1101", "India", "IN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1102", "Indonesia", "ID")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1103", "Iran, Islamic Republic of", "IR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1104", "Iraq", "IQ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1105", "Ireland", "IE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1106", "Israel", "IL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1107", "Italy", "IT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1108", "Jamaica", "JM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1109", "Japan", "JP")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1110", "Jordan", "JO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1111", "Kazakhstan", "KZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1112", "Kenya", "KE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1113", "Kiribati", "KI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1114", "Korea, Democratic People\'s Republic of", "KP")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1115", "Korea, Republic of", "KR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1116", "Kuwait", "KW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1117", "Kyrgyzstan", "KG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1118", "Lao People\'s Democratic Republic", "LA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1119", "Latvia", "LV")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1120", "Lebanon", "LB")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1121", "Lesotho", "LS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1122", "Liberia", "LR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1123", "Libyan Arab Jamahiriya", "LY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1124", "Liechtenstein", "LI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1125", "Lithuania", "LT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1126", "Luxembourg", "LU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1127", "Macao", "MO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1128", "Macedonia, Republic of", "MK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1129", "Madagascar", "MG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1130", "Malawi", "MW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1131", "Malaysia", "MY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1132", "Maldives", "MV")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1133", "Mali", "ML")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1134", "Malta", "MT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1135", "Marshall Islands", "MH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1136", "Martinique", "MQ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1137", "Mauritania", "MR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1138", "Mauritius", "MU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1139", "Mayotte", "YT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1140", "Mexico", "MX")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1141", "Micronesia, Federated States of", "FM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1142", "Moldova, Republic of", "MD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1143", "Monaco", "MC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1144", "Mongolia", "MN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1145", "Montserrat", "MS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1146", "Morocco", "MA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1147", "Mozambique", "MZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1148", "Namibia", "NA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1149", "Nauru", "NR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1150", "Nepal", "NP")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1151", "Netherlands Antilles", "AN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1152", "Netherlands", "NL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1153", "New Caledonia", "NC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1154", "New Zealand", "NZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1155", "Nicaragua", "NI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1156", "Niger", "NE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1157", "Nigeria", "NG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1158", "Niue", "NU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1159", "Norfolk Island", "NF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1160", "Northern Mariana Islands", "MP")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1161", "Norway", "NO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1162", "Oman", "OM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1163", "Pakistan", "PK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1164", "Palau", "PW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1165", "Palestinian Territory, Occupied", "PS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1166", "Panama", "PA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1167", "Papua New Guinea", "PG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1168", "Paraguay", "PY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1169", "Peru", "PE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1170", "Philippines", "PH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1171", "Pitcairn", "PN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1172", "Poland", "PL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1173", "Portugal", "PT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1174", "Puerto Rico", "PR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1175", "Qatar", "QA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1176", "Romania", "RO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1177", "Russian Federation", "RU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1178", "Rwanda", "RW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1179", "Reunion", "RE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1180", "Saint Helena", "SH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1181", "Saint Kitts and Nevis", "KN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1182", "Saint Lucia", "LC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1183", "Saint Pierre and Miquelon", "PM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1184", "Saint Vincent and the Grenadines", "VC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1185", "Samoa", "WS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1186", "San Marino", "SM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1187", "Saudi Arabia", "SA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1188", "Senegal", "SN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1189", "Seychelles", "SC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1190", "Sierra Leone", "SL")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1191", "Singapore", "SG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1192", "Slovakia", "SK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1193", "Slovenia", "SI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1194", "Solomon Islands", "SB")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1195", "Somalia", "SO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1196", "South Africa", "ZA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1197", "South Georgia and the South Sandwich Islands", "GS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1198", "Spain", "ES")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1199", "Sri Lanka", "LK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1200", "Sudan", "SD")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1201", "Suriname", "SR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1202", "Svalbard and Jan Mayen", "SJ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1203", "Swaziland", "SZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1204", "Sweden", "SE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1205", "Switzerland", "CH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1206", "Syrian Arab Republic", "SY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1207", "Sao Tome and Principe", "ST")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1208", "Taiwan", "TW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1209", "Tajikistan", "TJ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1210", "Tanzania, United Republic of", "TZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1211", "Thailand", "TH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1212", "Bahamas", "BS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1213", "Gambia", "GM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1214", "Togo", "TG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1215", "Tokelau", "TK")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1216", "Tonga", "TO")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1217", "Trinidad and Tobago", "TT")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1218", "Tunisia", "TN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1219", "Turkey", "TR")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1220", "Turkmenistan", "TM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1221", "Turks and Caicos Islands", "TC")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1222", "Tuvalu", "TV")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1223", "Uganda", "UG")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1224", "Ukraine", "UA")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1225", "United Arab Emirates", "AE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1226", "United Kingdom", "GB")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1227", "United States Minor Outlying Islands", "UM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1228", "United States", "US")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1229", "Uruguay", "UY")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1230", "Uzbekistan", "UZ")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1231", "Vanuatu", "VU")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1232", "Venezuela", "VE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1233", "Viet Nam", "VN")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1234", "Virgin Islands, U.S.", "VI")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1235", "Wallis and Futuna", "WF")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1236", "Western Sahara", "EH")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1237", "Yemen", "YE")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1238", "Serbia and Montenegro", "CS")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1239", "Zambia", "ZM")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1240", "Zimbabwe", "ZW")');
db_query('INSERT INTO civicrm_country (id, name,iso_code) VALUES("1241", "Åland Islands", "AX")');
// We also set up basic state/province info used by CiviCRM
db_query('INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
(1000, 1228, "AL", "Alabama"),
(1001, 1228, "AK", "Alaska"),
(1002, 1228, "AZ", "Arizona"),
(1003, 1228, "AR", "Arkansas"),
(1004, 1228, "CA", "California"),
(1005, 1228, "CO", "Colorado"),
(1006, 1228, "CT", "Connecticut"),
(1007, 1228, "DE", "Delaware"),
(1008, 1228, "FL", "Florida"),
(1009, 1228, "GA", "Georgia"),
(1010, 1228, "HI", "Hawaii"),
(1011, 1228, "ID", "Idaho"),
(1012, 1228, "IL", "Illinois"),
(1013, 1228, "IN", "Indiana"),
(1014, 1228, "IA", "Iowa"),
(1015, 1228, "KS", "Kansas"),
(1016, 1228, "KY", "Kentucky"),
(1017, 1228, "LA", "Louisiana"),
(1018, 1228, "ME", "Maine"),
(1019, 1228, "MD", "Maryland"),
(1020, 1228, "MA", "Massachusetts"),
(1021, 1228, "MI", "Michigan"),
(1022, 1228, "MN", "Minnesota"),
(1023, 1228, "MS", "Mississippi"),
(1024, 1228, "MO", "Missouri"),
(1025, 1228, "MT", "Montana"),
(1026, 1228, "NE", "Nebraska"),
(1027, 1228, "NV", "Nevada"),
(1028, 1228, "NH", "New Hampshire"),
(1029, 1228, "NJ", "New Jersey"),
(1030, 1228, "NM", "New Mexico"),
(1031, 1228, "NY", "New York"),
(1032, 1228, "NC", "North Carolina"),
(1033, 1228, "ND", "North Dakota"),
(1034, 1228, "OH", "Ohio"),
(1035, 1228, "OK", "Oklahoma"),
(1036, 1228, "OR", "Oregon"),
(1037, 1228, "PA", "Pennsylvania"),
(1038, 1228, "RI", "Rhode Island"),
(1039, 1228, "SC", "South Carolina"),
(1040, 1228, "SD", "South Dakota"),
(1041, 1228, "TN", "Tennessee"),
(1042, 1228, "TX", "Texas"),
(1043, 1228, "UT", "Utah"),
(1044, 1228, "VT", "Vermont"),
(1045, 1228, "VA", "Virginia"),
(1046, 1228, "WA", "Washington"),
(1047, 1228, "WV", "West Virginia"),
(1048, 1228, "WI", "Wisconsin"),
(1049, 1228, "WY", "Wyoming"),
(1050, 1228, "DC", "District of Columbia"),
(1052, 1228, "AS", "American Samoa"),
(1053, 1228, "GU", "Guam"),
(1055, 1228, "MP", "Northern Mariana Islands"),
(1056, 1228, "PR", "Puerto Rico"),
(1057, 1228, "VI", "Virgin Islands"),
(1058, 1228, "UM", "United States Minor Outlying Islands"),
(1059, 1228, "AE", "Armed Forces Europe"),
(1060, 1228, "AA", "Armed Forces Americas"),
(1061, 1228, "AP", "Armed Forces Pacific"),
(1100, 1039, "AB", "Alberta"),
(1101, 1039, "BC", "British Columbia"),
(1102, 1039, "MB", "Manitoba"),
(1103, 1039, "NB", "New Brunswick"),
(1104, 1039, "NL", "Newfoundland and Labrador"),
(1105, 1039, "NT", "Northwest Territories"),
(1106, 1039, "NS", "Nova Scotia"),
(1107, 1039, "NU", "Nunavut"),
(1108, 1039, "ON", "Ontario"),
(1109, 1039, "PE", "Prince Edward Island"),
(1110, 1039, "QC", "Quebec"),
(1111, 1039, "SK", "Saskatchewan"),
(1112, 1039, "YT", "Yukon Territory"),
(1200, 1101, "MM", "Maharashtra"),
(1201, 1101, "KA", "Karnataka"),
(1202, 1101, "AP", "Andhra Pradesh"),
(1203, 1101, "AR", "Arunachal Pradesh"),
(1204, 1101, "AS", "Assam"),
(1205, 1101, "BR", "Bihar"),
(1206, 1101, "CH", "Chhattisgarh"),
(1207, 1101, "GA", "Goa"),
(1208, 1101, "GJ", "Gujarat"),
(1209, 1101, "HR", "Haryana"),
(1210, 1101, "HP", "Himachal Pradesh"),
(1211, 1101, "JK", "Jammu and Kashmir"),
(1212, 1101, "JH", "Jharkhand"),
(1213, 1101, "KL", "Kerala"),
(1214, 1101, "MP", "Madhya Pradesh"),
(1215, 1101, "MN", "Manipur"),
(1216, 1101, "ML", "Meghalaya"),
(1217, 1101, "MZ", "Mizoram"),
(1218, 1101, "NL", "Nagaland"),
(1219, 1101, "OR", "Orissa"),
(1220, 1101, "PB", "Punjab"),
(1221, 1101, "RJ", "Rajasthan"),
(1222, 1101, "SK", "Sikkim"),
(1223, 1101, "TN", "Tamil Nadu"),
(1224, 1101, "TR", "Tripura"),
(1225, 1101, "UL", "Uttaranchal"),
(1226, 1101, "UP", "Uttar Pradesh"),
(1227, 1101, "WB", "West Bengal"),
(1228, 1101, "AN", "Andaman and Nicobar Islands"),
(1229, 1101, "DN", "Dadra and Nagar Haveli"),
(1230, 1101, "DD", "Daman and Diu"),
(1231, 1101, "DL", "Delhi"),
(1232, 1101, "LD", "Lakshadweep"),
(1233, 1101, "PY", "Pondicherry"),
(1300, 1172, "MZ", "mazowieckie"),
(1301, 1172, "PM", "pomorskie"),
(1302, 1172, "DS", "dolnośląskie"),
(1303, 1172, "KP", "kujawsko-pomorskie"),
(1304, 1172, "LU", "lubelskie"),
(1305, 1172, "LB", "lubuskie"),
(1306, 1172, "LD", "łódzkie"),
(1307, 1172, "MA", "małopolskie"),
(1308, 1172, "OP", "opolskie"),
(1309, 1172, "PK", "podkarpackie"),
(1310, 1172, "PD", "podlaskie"),
(1311, 1172, "SL", "śląskie"),
(1312, 1172, "SK", "świętokrzyskie"),
(1313, 1172, "WN", "warmińsko-mazurskie"),
(1314, 1172, "WP", "wielkopolskie"),
(1315, 1172, "ZP", "zachodniopomorskie"),
(1500, 1225, "AZ", "Abu Zaby"),
(1501, 1225, "AJ", "\'Ajman"),
(1502, 1225, "FU", "Al Fujayrah"),
(1503, 1225, "SH", "Ash Shariqah"),
(1504, 1225, "DU", "Dubayy"),
(1505, 1225, "RK", "Ra\'s al Khaymah"),
(1506, 1233, "33", "Dac Lac"),
(1507, 1225, "UQ", "Umm al Qaywayn"),
(1508, 1001, "BDS", "Badakhshan"),
(1509, 1001, "BDG", "Badghis"),
(1510, 1001, "BGL", "Baghlan"),
(1511, 1001, "BAL", "Balkh"),
(1512, 1001, "BAM", "Bamian"),
(1513, 1001, "FRA", "Farah"),
(1514, 1001, "FYB", "Faryab"),
(1515, 1001, "GHA", "Ghazni"),
(1516, 1001, "GHO", "Ghowr"),
(1517, 1001, "HEL", "Helmand"),
(1518, 1001, "HER", "Herat"),
(1519, 1001, "JOW", "Jowzjan"),
(1520, 1001, "KAB", "Kabul"),
(1521, 1001, "KAN", "Kandahar"),
(1522, 1001, "KAP", "Kapisa"),
(1523, 1001, "KHO", "Khowst"),
(1524, 1001, "KNR", "Konar"),
(1525, 1001, "KDZ", "Kondoz"),
(1526, 1001, "LAG", "Laghman"),
(1527, 1001, "LOW", "Lowgar"),
(1528, 1001, "NAN", "Nangrahar"),
(1529, 1001, "NIM", "Nimruz"),
(1530, 1001, "NUR", "Nurestan"),
(1531, 1001, "ORU", "Oruzgan"),
(1532, 1001, "PIA", "Paktia"),
(1533, 1001, "PKA", "Paktika"),
(1534, 1001, "PAR", "Parwan"),
(1535, 1001, "SAM", "Samangan"),
(1536, 1001, "SAR", "Sar-e Pol"),
(1537, 1001, "TAK", "Takhar"),
(1538, 1001, "WAR", "Wardak"),
(1539, 1001, "ZAB", "Zabol"),
(1540, 1002, "BR", "Berat"),
(1541, 1002, "BU", "Bulqizë"),
(1542, 1002, "DL", "Delvinë"),
(1543, 1002, "DV", "Devoll"),
(1544, 1002, "DI", "Dibër"),
(1545, 1002, "DR", "Durrsës"),
(1546, 1002, "EL", "Elbasan"),
(1547, 1002, "FR", "Fier"),
(1548, 1002, "GR", "Gramsh"),
(1549, 1002, "GJ", "Gjirokastër"),
(1550, 1002, "HA", "Has"),
(1551, 1002, "KA", "Kavajë"),
(1552, 1002, "ER", "Kolonjë"),
(1553, 1002, "KO", "Korcë"),
(1554, 1002, "KR", "Krujë"),
(1555, 1002, "KC", "Kuçovë"),
(1556, 1002, "KU", "Kukës"),
(1557, 1002, "KB", "Kurbin"),
(1558, 1002, "LE", "Lezhë"),
(1559, 1002, "LB", "Librazhd"),
(1560, 1002, "LU", "Lushnjë"),
(1561, 1002, "MM", "Malësi e Madhe"),
(1562, 1002, "MK", "Mallakastër"),
(1563, 1002, "MT", "Mat"),
(1564, 1002, "MR", "Mirditë"),
(1565, 1002, "PQ", "Peqin"),
(1566, 1002, "PR", "Përmet"),
(1567, 1002, "PG", "Pogradec"),
(1568, 1002, "PU", "Pukë"),
(1569, 1002, "SR", "Sarandë"),
(1570, 1002, "SK", "Skrapar"),
(1571, 1002, "SH", "Shkodër"),
(1572, 1002, "TE", "Tepelenë"),
(1573, 1002, "TR", "Tiranë"),
(1574, 1002, "TP", "Tropojë"),
(1575, 1002, "VL", "Vlorë"),
(1576, 1011, "ER", "Erevan"),
(1577, 1011, "AG", "Aragacotn"),
(1578, 1011, "AR", "Ararat"),
(1579, 1011, "AV", "Armavir"),
(1580, 1011, "GR", "Gegarkunik\'"),
(1581, 1011, "KT", "Kotayk\'"),
(1582, 1011, "LO", "Lory"),
(1583, 1011, "SH", "Sirak"),
(1584, 1011, "SU", "Syunik\'"),
(1585, 1011, "TV", "Tavus"),
(1586, 1011, "VD", "Vayoc Jor"),
(1587, 1006, "BGO", "Bengo"),
(1588, 1006, "BGU", "Benguela"),
(1589, 1006, "BIE", "Bie"),
(1590, 1006, "CAB", "Cabinda"),
(1591, 1006, "CCU", "Cuando-Cubango"),
(1592, 1006, "CNO", "Cuanza Norte"),
(1593, 1006, "CUS", "Cuanza Sul"),
(1594, 1006, "CNN", "Cunene"),
(1595, 1006, "HUA", "Huambo"),
(1596, 1006, "HUI", "Huila"),
(1597, 1006, "LUA", "Luanda"),
(1598, 1006, "LNO", "Lunda Norte"),
(1599, 1006, "LSU", "Lunda Sul"),
(1600, 1006, "MAL", "Malange"),
(1601, 1006, "MOX", "Moxico"),
(1602, 1006, "NAM", "Namibe"),
(1603, 1006, "UIG", "Uige"),
(1604, 1006, "ZAI", "Zaire"),
(1605, 1010, "C", "Capital federal"),
(1606, 1010, "B", "Buenos Aires"),
(1607, 1010, "K", "Catamarca"),
(1608, 1010, "X", "Cordoba"),
(1609, 1010, "W", "Corrientes"),
(1610, 1010, "H", "Chaco"),
(1611, 1010, "U", "Chubut"),
(1612, 1010, "E", "Entre Rios"),
(1613, 1010, "P", "Formosa"),
(1614, 1010, "Y", "Jujuy"),
(1615, 1010, "L", "La Pampa"),
(1616, 1010, "M", "Mendoza"),
(1617, 1010, "N", "Misiones"),
(1618, 1010, "Q", "Neuquen"),
(1619, 1010, "R", "Rio Negro"),
(1620, 1010, "A", "Salta"),
(1621, 1010, "J", "San Juan"),
(1622, 1010, "D", "San Luis"),
(1623, 1010, "Z", "Santa Cruz"),
(1624, 1010, "S", "Santa Fe"),
(1625, 1010, "G", "Santiago del Estero"),
(1626, 1010, "V", "Tierra del Fuego"),
(1627, 1010, "T", "Tucuman"),
(1628, 1014, "1", "Burgenland"),
(1629, 1014, "2", "Kärnten"),
(1630, 1014, "3", "Niederosterreich"),
(1631, 1014, "4", "Oberosterreich"),
(1632, 1014, "5", "Salzburg"),
(1633, 1014, "6", "Steiermark"),
(1634, 1014, "7", "Tirol"),
(1635, 1014, "8", "Vorarlberg"),
(1636, 1014, "9", "Wien"),
(1637, 1013, "AAT", "Australian Antarctic Territory"),
(1638, 1013, "ACT", "Australian Capital Territory"),
(1639, 1013, "NT", "Northern Territory"),
(1640, 1013, "NSW", "New South Wales"),
(1641, 1013, "QLD", "Queensland"),
(1642, 1013, "SA", "South Australia"),
(1643, 1013, "TAS", "Tasmania"),
(1644, 1013, "VIC", "Victoria"),
(1645, 1013, "WA", "Western Australia"),
(1646, 1015, "NX", "Naxcivan"),
(1647, 1015, "AB", "Ali Bayramli"),
(1648, 1015, "BA", "Baki"),
(1649, 1015, "GA", "Ganca"),
(1650, 1015, "LA", "Lankaran"),
(1651, 1015, "MI", "Mingacevir"),
(1652, 1015, "NA", "Naftalan"),
(1653, 1015, "SA", "Saki"),
(1654, 1015, "SM", "Sumqayit"),
(1655, 1015, "SS", "Susa"),
(1656, 1015, "XA", "Xankandi"),
(1657, 1015, "YE", "Yevlax"),
(1658, 1015, "ABS", "Abseron"),
(1659, 1015, "AGC", "Agcabadi"),
(1660, 1015, "AGM", "Agdam"),
(1661, 1015, "AGS", "Agdas"),
(1662, 1015, "AGA", "Agstafa"),
(1663, 1015, "AGU", "Agsu"),
(1664, 1015, "AST", "Astara"),
(1665, 1015, "BAB", "Babak"),
(1666, 1015, "BAL", "Balakan"),
(1667, 1015, "BAR", "Barda"),
(1668, 1015, "BEY", "Beylagan"),
(1669, 1015, "BIL", "Bilasuvar"),
(1670, 1015, "CAB", "Cabrayll"),
(1671, 1015, "CAL", "Calilabad"),
(1672, 1015, "CUL", "Culfa"),
(1673, 1015, "DAS", "Daskasan"),
(1674, 1015, "DAV", "Davaci"),
(1675, 1015, "FUZ", "Fuzuli"),
(1676, 1015, "GAD", "Gadabay"),
(1677, 1015, "GOR", "Goranboy"),
(1678, 1015, "GOY", "Goycay"),
(1679, 1015, "HAC", "Haciqabul"),
(1680, 1015, "IMI", "Imisli"),
(1681, 1015, "ISM", "Ismayilli"),
(1682, 1015, "KAL", "Kalbacar"),
(1683, 1015, "KUR", "Kurdamir"),
(1684, 1015, "LAC", "Lacin"),
(1685, 1015, "LER", "Lerik"),
(1686, 1015, "MAS", "Masalli"),
(1687, 1015, "NEF", "Neftcala"),
(1688, 1015, "OGU", "Oguz"),
(1689, 1015, "ORD", "Ordubad"),
(1690, 1015, "QAB", "Qabala"),
(1691, 1015, "QAX", "Qax"),
(1692, 1015, "QAZ", "Qazax"),
(1693, 1015, "QOB", "Qobustan"),
(1694, 1015, "QBA", "Quba"),
(1695, 1015, "QBI", "Qubadli"),
(1696, 1015, "QUS", "Qusar"),
(1697, 1015, "SAT", "Saatli"),
(1698, 1015, "SAB", "Sabirabad"),
(1699, 1015, "SAD", "Sadarak"),
(1700, 1015, "SAH", "Sahbuz"),
(1701, 1015, "SAL", "Salyan"),
(1702, 1015, "SMI", "Samaxi"),
(1703, 1015, "SKR", "Samkir"),
(1704, 1015, "SMX", "Samux"),
(1705, 1015, "SAR", "Sarur"),
(1706, 1015, "SIY", "Siyazan"),
(1707, 1015, "TAR", "Tartar"),
(1708, 1015, "TOV", "Tovuz"),
(1709, 1015, "UCA", "Ucar"),
(1710, 1015, "XAC", "Xacmaz"),
(1711, 1015, "XAN", "Xanlar"),
(1712, 1015, "XIZ", "Xizi"),
(1713, 1015, "XCI", "Xocali"),
(1714, 1015, "XVD", "Xocavand"),
(1715, 1015, "YAR", "Yardimli"),
(1716, 1015, "ZAN", "Zangilan"),
(1717, 1015, "ZAQ", "Zaqatala"),
(1718, 1015, "ZAR", "Zardab"),
(1719, 1026, "BIH", "Federacija Bosna i Hercegovina"),
(1720, 1026, "SRP", "Republika Srpska"),
(1721, 1017, "05", "Bagerhat zila"),
(1722, 1017, "01", "Bandarban zila"),
(1723, 1017, "02", "Barguna zila"),
(1724, 1017, "06", "Barisal zila"),
(1725, 1017, "07", "Bhola zila"),
(1726, 1017, "03", "Bogra zila"),
(1727, 1017, "04", "Brahmanbaria zila"),
(1728, 1017, "09", "Chandpur zila"),
(1729, 1017, "10", "Chittagong zila"),
(1730, 1017, "12", "Chuadanga zila"),
(1731, 1017, "08", "Comilla zila"),
(1732, 1017, "11", "Cox\'s Bazar zila"),
(1733, 1017, "13", "Dhaka zila"),
(1734, 1017, "14", "Dinajpur zila"),
(1735, 1017, "15", "Faridpur zila"),
(1736, 1017, "16", "Feni zila"),
(1737, 1017, "19", "Gaibandha zila"),
(1738, 1017, "18", "Gazipur zila"),
(1739, 1017, "17", "Gopalganj zila"),
(1740, 1017, "20", "Habiganj zila"),
(1741, 1017, "24", "Jaipurhat zila"),
(1742, 1017, "21", "Jamalpur zila"),
(1743, 1017, "22", "Jessore zila"),
(1744, 1017, "25", "Jhalakati zila"),
(1745, 1017, "23", "Jhenaidah zila"),
(1746, 1017, "29", "Khagrachari zila"),
(1747, 1017, "27", "Khulna zila"),
(1748, 1017, "26", "Kishorganj zila"),
(1749, 1017, "28", "Kurigram zila"),
(1750, 1017, "30", "Kushtia zila"),
(1751, 1017, "31", "Lakshmipur zila"),
(1752, 1017, "32", "Lalmonirhat zila"),
(1753, 1017, "36", "Madaripur zila"),
(1754, 1017, "37", "Magura zila"),
(1755, 1017, "33", "Manikganj zila"),
(1756, 1017, "39", "Meherpur zila"),
(1757, 1017, "38", "Moulvibazar zila"),
(1758, 1017, "35", "Munshiganj zila"),
(1759, 1017, "34", "Mymensingh zila"),
(1760, 1017, "48", "Naogaon zila"),
(1761, 1017, "43", "Narail zila"),
(1762, 1017, "40", "Narayanganj zila"),
(1763, 1017, "42", "Narsingdi zila"),
(1764, 1017, "44", "Natore zila"),
(1765, 1017, "45", "Nawabganj zila"),
(1766, 1017, "41", "Netrakona zila"),
(1767, 1017, "46", "Nilphamari zila"),
(1768, 1017, "47", "Noakhali zila"),
(1769, 1017, "49", "Pabna zila"),
(1770, 1017, "52", "Panchagarh zila"),
(1771, 1017, "51", "Patuakhali zila"),
(1772, 1017, "50", "Pirojpur zila"),
(1773, 1017, "53", "Rajbari zila"),
(1774, 1017, "54", "Rajshahi zila"),
(1775, 1017, "56", "Rangamati zila"),
(1776, 1017, "55", "Rangpur zila"),
(1777, 1017, "58", "Satkhira zila"),
(1778, 1017, "62", "Shariatpur zila"),
(1779, 1017, "57", "Sherpur zila"),
(1780, 1017, "59", "Sirajganj zila"),
(1781, 1017, "61", "Sunamganj zila"),
(1782, 1017, "60", "Sylhet zila"),
(1783, 1017, "63", "Tangail zila"),
(1784, 1017, "64", "Thakurgaon zila"),
(1785, 1020, "VAN", "Antwerpen"),
(1786, 1020, "WBR", "Brabant Wallon"),
(1787, 1020, "WHT", "Hainaut"),
(1788, 1020, "WLG", "Liege"),
(1789, 1020, "VLI", "Limburg"),
(1790, 1020, "WLX", "Luxembourg"),
(1791, 1020, "WNA", "Namur"),
(1792, 1020, "VOV", "Oost-Vlaanderen"),
(1793, 1020, "VBR", "Vlaams-Brabant"),
(1794, 1020, "VWV", "West-Vlaanderen"),
(1795, 1034, "BAL", "Bale"),
(1796, 1034, "BAM", "Bam"),
(1797, 1034, "BAN", "Banwa"),
(1798, 1034, "BAZ", "Bazega"),
(1799, 1034, "BGR", "Bougouriba"),
(1800, 1034, "BLG", "Boulgou"),
(1801, 1034, "BLK", "Boulkiemde"),
(1802, 1034, "COM", "Comoe"),
(1803, 1034, "GAN", "Ganzourgou"),
(1804, 1034, "GNA", "Gnagna"),
(1805, 1034, "GOU", "Gourma"),
(1806, 1034, "HOU", "Houet"),
(1807, 1034, "IOB", "Ioba"),
(1808, 1034, "KAD", "Kadiogo"),
(1809, 1034, "KEN", "Kenedougou"),
(1810, 1034, "KMD", "Komondjari"),
(1811, 1034, "KMP", "Kompienga"),
(1812, 1034, "KOS", "Kossi"),
(1813, 1034, "KOP", "Koulpulogo"),
(1814, 1034, "KOT", "Kouritenga"),
(1815, 1034, "KOW", "Kourweogo"),
(1816, 1034, "LER", "Leraba"),
(1817, 1034, "LOR", "Loroum"),
(1818, 1034, "MOU", "Mouhoun"),
(1819, 1034, "NAO", "Nahouri"),
(1820, 1034, "NAM", "Namentenga"),
(1821, 1034, "NAY", "Nayala"),
(1822, 1034, "NOU", "Noumbiel"),
(1823, 1034, "OUB", "Oubritenga"),
(1824, 1034, "OUD", "Oudalan"),
(1825, 1034, "PAS", "Passore"),
(1826, 1034, "PON", "Poni"),
(1827, 1034, "SNG", "Sanguie"),
(1828, 1034, "SMT", "Sanmatenga"),
(1829, 1034, "SEN", "Seno"),
(1830, 1034, "SIS", "Siasili"),
(1831, 1034, "SOM", "Soum"),
(1832, 1034, "SOR", "Sourou"),
(1833, 1034, "TAP", "Tapoa"),
(1834, 1034, "TUI", "Tui"),
(1835, 1034, "YAG", "Yagha"),
(1836, 1034, "YAT", "Yatenga"),
(1837, 1034, "ZIR", "Ziro"),
(1838, 1034, "ZON", "Zondoma"),
(1839, 1034, "ZOU", "Zoundweogo"),
(1840, 1033, "01", "Blagoevgrad"),
(1841, 1033, "02", "Burgas"),
(1842, 1033, "08", "Dobric"),
(1843, 1033, "07", "Gabrovo"),
(1844, 1033, "26", "Haskovo"),
(1845, 1033, "28", "Jambol"),
(1846, 1033, "09", "Kardzali"),
(1847, 1033, "10", "Kjstendil"),
(1848, 1033, "11", "Lovec"),
(1849, 1033, "12", "Montana"),
(1850, 1033, "13", "Pazardzik"),
(1851, 1033, "14", "Pernik"),
(1852, 1033, "15", "Pleven"),
(1853, 1033, "16", "Plovdiv"),
(1854, 1033, "17", "Razgrad"),
(1855, 1033, "18", "Ruse"),
(1856, 1033, "19", "Silistra"),
(1857, 1033, "20", "Sliven"),
(1858, 1033, "21", "Smoljan"),
(1859, 1033, "23", "Sofija"),
(1860, 1033, "24", "Stara Zagora"),
(1861, 1033, "27", "Sumen"),
(1862, 1033, "25", "Targoviste"),
(1863, 1033, "03", "Varna"),
(1864, 1033, "04", "Veliko Tarnovo"),
(1865, 1033, "05", "Vidin"),
(1866, 1033, "06", "Vraca"),
(1867, 1016, "01", "Al Hadd"),
(1868, 1016, "03", "Al Manamah"),
(1869, 1016, "10", "Al Mintaqah al Gharbiyah"),
(1870, 1016, "07", "Al Mintagah al Wusta"),
(1871, 1016, "05", "Al Mintaqah ash Shamaliyah"),
(1872, 1016, "02", "Al Muharraq"),
(1873, 1016, "09", "Ar Rifa"),
(1874, 1016, "04", "Jidd Hafs"),
(1875, 1016, "12", "Madluat Jamad"),
(1876, 1016, "08", "Madluat Isa"),
(1877, 1016, "11", "Mintaqat Juzur tawar"),
(1878, 1016, "06", "Sitrah"),
(1879, 1036, "BB", "Bubanza"),
(1880, 1036, "BJ", "Bujumbura"),
(1881, 1036, "BR", "Bururi"),
(1882, 1036, "CA", "Cankuzo"),
(1883, 1036, "CI", "Cibitoke"),
(1884, 1036, "GI", "Gitega"),
(1885, 1036, "KR", "Karuzi"),
(1886, 1036, "KY", "Kayanza"),
(1887, 1036, "MA", "Makamba"),
(1888, 1036, "MU", "Muramvya"),
(1889, 1036, "MW", "Mwaro"),
(1890, 1036, "NG", "Ngozi"),
(1891, 1036, "RT", "Rutana"),
(1892, 1036, "RY", "Ruyigi"),
(1893, 1022, "AL", "Alibori"),
(1894, 1022, "AK", "Atakora"),
(1895, 1022, "AQ", "Atlantique"),
(1896, 1022, "BO", "Borgou"),
(1897, 1022, "CO", "Collines"),
(1898, 1022, "DO", "Donga"),
(1899, 1022, "KO", "Kouffo"),
(1900, 1022, "LI", "Littoral"),
(1901, 1022, "MO", "Mono"),
(1902, 1022, "OU", "Oueme"),
(1903, 1022, "PL", "Plateau"),
(1904, 1022, "ZO", "Zou"),
(1905, 1032, "BE", "Belait"),
(1906, 1032, "BM", "Brunei-Muara"),
(1907, 1032, "TE", "Temburong"),
(1908, 1032, "TU", "Tutong"),
(1909, 1025, "C", "Cochabamba"),
(1910, 1025, "H", "Chuquisaca"),
(1911, 1025, "B", "El Beni"),
(1912, 1025, "L", "La Paz"),
(1913, 1025, "O", "Oruro"),
(1914, 1025, "N", "Pando"),
(1915, 1025, "P", "Potosi"),
(1916, 1025, "T", "Tarija"),
(1917, 1029, "AC", "Acre"),
(1918, 1029, "AL", "Alagoas"),
(1919, 1029, "AM", "Amazonas"),
(1920, 1029, "AP", "Amapa"),
(1921, 1029, "BA", "Baia"),
(1922, 1029, "CE", "Ceara"),
(1923, 1029, "DF", "Distrito Federal"),
(1924, 1029, "ES", "Espirito Santo"),
(1925, 1029, "FN", "Fernando de Noronha"),
(1926, 1029, "GO", "Goias"),
(1927, 1029, "MA", "Maranhao"),
(1928, 1029, "MG", "Minas Gerais"),
(1929, 1029, "MS", "Mato Grosso do Sul"),
(1930, 1029, "MT", "Mato Grosso"),
(1931, 1029, "PA", "Para"),
(1932, 1029, "PB", "Paraiba"),
(1933, 1029, "PE", "Pernambuco"),
(1934, 1029, "PI", "Piaui"),
(1935, 1029, "PR", "Parana"),
(1936, 1029, "RJ", "Rio de Janeiro"),
(1937, 1029, "RN", "Rio Grande do Norte"),
(1938, 1029, "RO", "Rondonia"),
(1939, 1029, "RR", "Roraima"),
(1940, 1029, "RS", "Rio Grande do Sul"),
(1941, 1029, "SC", "Santa Catarina"),
(1942, 1029, "SE", "Sergipe"),
(1943, 1029, "SP", "Sao Paulo"),
(1944, 1029, "TO", "Tocatins"),
(1945, 1212, "AC", "Acklins and Crooked Islands"),
(1946, 1212, "BI", "Bimini"),
(1947, 1212, "CI", "Cat Island"),
(1948, 1212, "EX", "Exuma"),
(1949, 1212, "FP", "Freeport"),
(1950, 1212, "FC", "Fresh Creek"),
(1951, 1212, "GH", "Governor\'s Harbour"),
(1952, 1212, "GT", "Green Turtle Cay"),
(1953, 1212, "HI", "Harbour Island"),
(1954, 1212, "HR", "High Rock"),
(1955, 1212, "IN", "Inagua"),
(1956, 1212, "KB", "Kemps Bay"),
(1957, 1212, "LI", "Long Island"),
(1958, 1212, "MH", "Marsh Harbour"),
(1959, 1212, "MG", "Mayaguana"),
(1960, 1212, "NP", "New Providence"),
(1961, 1212, "NB", "Nicholls Town and Berry Islands"),
(1962, 1212, "RI", "Ragged Island"),
(1963, 1212, "RS", "Rock Sound"),
(1964, 1212, "SP", "Sandy Point"),
(1965, 1212, "SR", "San Salvador and Rum Cay"),
(1966, 1024, "33", "Bumthang"),
(1967, 1024, "12", "Chhukha"),
(1968, 1024, "22", "Dagana"),
(1969, 1024, "GA", "Gasa"),
(1970, 1024, "13", "Ha"),
(1971, 1024, "44", "Lhuentse"),
(1972, 1024, "42", "Monggar"),
(1973, 1024, "11", "Paro"),
(1974, 1024, "43", "Pemagatshel"),
(1975, 1024, "23", "Punakha"),
(1976, 1024, "45", "Samdrup Jongkha"),
(1977, 1024, "14", "Samtee"),
(1978, 1024, "31", "Sarpang"),
(1979, 1024, "15", "Thimphu"),
(1980, 1024, "41", "Trashigang"),
(1981, 1024, "TY", "Trashi Yangtse"),
(1982, 1024, "32", "Trongsa"),
(1983, 1024, "21", "Tsirang"),
(1984, 1024, "24", "Wangdue Phodrang"),
(1985, 1024, "34", "Zhemgang"),
(1986, 1027, "CE", "Central"),
(1987, 1027, "GH", "Ghanzi"),
(1988, 1027, "KG", "Kgalagadi"),
(1989, 1027, "KL", "Kgatleng"),
(1990, 1027, "KW", "Kweneng"),
(1991, 1027, "NG", "Ngamiland"),
(1992, 1027, "NE", "North-East"),
(1993, 1027, "NW", "North-West"),
(1994, 1027, "SE", "South-East"),
(1995, 1027, "SO", "Southern"),
(1996, 1019, "BR", "Brèsckaja voblasc\'"),
(1997, 1019, "HO", "Homel\'skaja voblasc\'"),
(1998, 1019, "HR", "Hrodzenskaja voblasc\'"),
(1999, 1019, "MA", "Mahilëuskaja voblasc\'"),
(2000, 1019, "MI", "Minskaja voblasc\'"),
(2001, 1019, "VI", "Vicebskaja voblasc\'"),
(2002, 1021, "BZ", "Belize"),
(2003, 1021, "CY", "Cayo"),
(2004, 1021, "CZL", "Corozal"),
(2005, 1021, "OW", "Orange Walk"),
(2006, 1021, "SC", "Stann Creek"),
(2007, 1021, "TOL", "Toledo"),
(2008, 1050, "KN", "Kinshasa"),
(2009, 1050, "BN", "Bandundu"),
(2010, 1050, "BC", "Bas-Congo"),
(2011, 1050, "EQ", "Equateur"),
(2012, 1050, "HC", "Haut-Congo"),
(2013, 1050, "KW", "Kasai-Occidental"),
(2014, 1050, "KE", "Kasai-Oriental"),
(2015, 1050, "KA", "Katanga"),
(2016, 1050, "MA", "Maniema"),
(2017, 1050, "NK", "Nord-Kivu"),
(2018, 1050, "OR", "Orientale"),
(2019, 1050, "SK", "Sud-Kivu"),
(2020, 1042, "BGF", "Bangui"),
(2021, 1042, "BB", "Bamingui-Bangoran"),
(2022, 1042, "BK", "Basse-Kotto"),
(2023, 1042, "HK", "Haute-Kotto"),
(2024, 1042, "HM", "Haut-Mbomou"),
(2025, 1042, "KG", "Kemo"),
(2026, 1042, "LB", "Lobaye"),
(2027, 1042, "HS", "Mambere-Kadei"),
(2028, 1042, "MB", "Mbomou"),
(2029, 1042, "KB", "Nana-Grebizi"),
(2030, 1042, "NM", "Nana-Mambere"),
(2031, 1042, "MP", "Ombella-Mpoko"),
(2032, 1042, "UK", "Ouaka"),
(2033, 1042, "AC", "Ouham"),
(2034, 1042, "OP", "Ouham-Pende"),
(2035, 1042, "SE", "Sangha-Mbaere"),
(2036, 1042, "VR", "Vakaga"),
(2037, 1051, "BZV", "Brazzaville"),
(2038, 1051, "11", "Bouenza"),
(2039, 1051, "8", "Cuvette"),
(2040, 1051, "15", "Cuvette-Ouest"),
(2041, 1051, "5", "Kouilou"),
(2042, 1051, "2", "Lekoumou"),
(2043, 1051, "7", "Likouala"),
(2044, 1051, "9", "Niari"),
(2045, 1051, "14", "Plateaux"),
(2046, 1051, "12", "Pool"),
(2047, 1051, "13", "Sangha"),
(2048, 1205, "AG", "Aargau"),
(2049, 1205, "AI", "Appenzell Innerrhoden"),
(2050, 1205, "AR", "Appenzell Ausserrhoden"),
(2051, 1205, "BE", "Bern"),
(2052, 1205, "BL", "Basel-Landschaft"),
(2053, 1205, "BS", "Basel-Stadt"),
(2054, 1205, "FR", "Fribourg"),
(2055, 1205, "GE", "Geneva"),
(2056, 1205, "GL", "Glarus"),
(2057, 1205, "GR", "Graubunden"),
(2058, 1205, "JU", "Jura"),
(2059, 1205, "LU", "Luzern"),
(2060, 1205, "NE", "Neuchatel"),
(2061, 1205, "NW", "Nidwalden"),
(2062, 1205, "OW", "Obwalden"),
(2063, 1205, "SG", "Sankt Gallen"),
(2064, 1205, "SH", "Schaffhausen"),
(2065, 1205, "SO", "Solothurn"),
(2066, 1205, "SZ", "Schwyz"),
(2067, 1205, "TG", "Thurgau"),
(2068, 1205, "TI", "Ticino"),
(2069, 1205, "UR", "Uri"),
(2070, 1205, "VD", "Vaud"),
(2071, 1205, "VS", "Valais"),
(2072, 1205, "ZG", "Zug"),
(2073, 1205, "ZH", "Zurich"),
(2074, 1054, "06", "18 Montagnes"),
(2075, 1054, "16", "Agnebi"),
(2076, 1054, "09", "Bas-Sassandra"),
(2077, 1054, "10", "Denguele"),
(2078, 1054, "02", "Haut-Sassandra"),
(2079, 1054, "07", "Lacs"),
(2080, 1054, "01", "Lagunes"),
(2081, 1054, "12", "Marahoue"),
(2082, 1054, "05", "Moyen-Comoe"),
(2083, 1054, "11", "Nzi-Comoe"),
(2084, 1054, "03", "Savanes"),
(2085, 1054, "15", "Sud-Bandama"),
(2086, 1054, "13", "Sud-Comoe"),
(2087, 1054, "04", "Vallee du Bandama"),
(2088, 1054, "14", "Worodouqou"),
(2089, 1054, "08", "Zanzan"),
(2090, 1044, "AI", "Aisen del General Carlos Ibanez del Campo"),
(2091, 1044, "AN", "Antofagasta"),
(2092, 1044, "AR", "Araucania"),
(2093, 1044, "AT", "Atacama"),
(2094, 1044, "BI", "Bio-Bio"),
(2095, 1044, "CO", "Coquimbo"),
(2096, 1044, "LI", "Libertador General Bernardo O\'Higgins"),
(2097, 1044, "LL", "Los Lagos"),
(2098, 1044, "MA", "Magallanes"),
(2099, 1044, "ML", "Maule"),
(2100, 1044, "RM", "Region Metropolitana de Santiago"),
(2101, 1044, "TA", "Tarapaca"),
(2102, 1044, "VS", "Valparaiso"),
(2103, 1038, "AD", "Adamaoua"),
(2104, 1038, "CE", "Centre"),
(2105, 1038, "ES", "East"),
(2106, 1038, "EN", "Far North"),
(2107, 1038, "NO", "North"),
(2108, 1038, "SW", "South"),
(2109, 1038, "SW", "South-West"),
(2110, 1038, "OU", "West"),
(2111, 1045, "11", "Beijing"),
(2112, 1045, "50", "Chongqing"),
(2113, 1045, "31", "Shanghai"),
(2114, 1045, "12", "Tianjin"),
(2115, 1045, "34", "Anhui"),
(2116, 1045, "35", "Fujian"),
(2117, 1045, "62", "Gansu"),
(2118, 1045, "44", "Guangdong"),
(2119, 1045, "52", "Gulzhou"),
(2120, 1045, "46", "Hainan"),
(2121, 1045, "13", "Hebei"),
(2122, 1045, "23", "Heilongjiang"),
(2123, 1045, "41", "Henan"),
(2124, 1045, "42", "Hubei"),
(2125, 1045, "43", "Hunan"),
(2126, 1045, "32", "Jiangsu"),
(2127, 1045, "36", "Jiangxi"),
(2128, 1045, "22", "Jilin"),
(2129, 1045, "21", "Liaoning"),
(2130, 1045, "63", "Qinghai"),
(2131, 1045, "61", "Shaanxi"),
(2132, 1045, "37", "Shandong"),
(2133, 1045, "14", "Shanxi"),
(2134, 1045, "51", "Sichuan"),
(2135, 1045, "71", "Taiwan"),
(2136, 1045, "53", "Yunnan"),
(2137, 1045, "33", "Zhejiang"),
(2138, 1045, "45", "Guangxi"),
(2139, 1045, "15", "Neia Mongol (mn)"),
(2140, 1045, "65", "Xinjiang"),
(2141, 1045, "54", "Xizang"),
(2142, 1045, "91", "Hong Kong"),
(2143, 1045, "92", "Macau"),
(2144, 1048, "DC", "Distrito Capital de Bogotá"),
(2145, 1048, "AMA", "Amazonea"),
(2146, 1048, "ANT", "Antioquia"),
(2147, 1048, "ARA", "Arauca"),
(2148, 1048, "ATL", "Atlántico"),
(2149, 1048, "BOL", "Bolívar"),
(2150, 1048, "BOY", "Boyacá"),
(2151, 1048, "CAL", "Caldea"),
(2152, 1048, "CAQ", "Caquetá"),
(2153, 1048, "CAS", "Casanare"),
(2154, 1048, "CAU", "Cauca"),
(2155, 1048, "CES", "Cesar"),
(2156, 1048, "COR", "Córdoba"),
(2157, 1048, "CUN", "Cundinamarca"),
(2158, 1048, "CHO", "Chocó"),
(2159, 1048, "GUA", "Guainía"),
(2160, 1048, "GUV", "Guaviare"),
(2161, 1048, "LAG", "La Guajira"),
(2162, 1048, "MAG", "Magdalena"),
(2163, 1048, "MET", "Meta"),
(2164, 1048, "NAR", "Nariño"),
(2165, 1048, "NSA", "Norte de Santander"),
(2166, 1048, "PUT", "Putumayo"),
(2167, 1048, "QUI", "Quindio"),
(2168, 1048, "RIS", "Risaralda"),
(2169, 1048, "SAP", "San Andrés, Providencia y Santa Catalina"),
(2170, 1048, "SAN", "Santander"),
(2171, 1048, "SUC", "Sucre"),
(2172, 1048, "TOL", "Tolima"),
(2173, 1048, "VAC", "Valle del Cauca"),
(2174, 1048, "VAU", "Vaupés"),
(2175, 1048, "VID", "Vichada"),
(2176, 1053, "A", "Alajuela"),
(2177, 1053, "C", "Cartago"),
(2178, 1053, "G", "Guanacaste"),
(2179, 1053, "H", "Heredia"),
(2180, 1053, "L", "Limon"),
(2181, 1053, "P", "Puntarenas"),
(2182, 1053, "SJ", "San Jose"),
(2183, 1056, "09", "Camagey"),
(2184, 1056, "08", "Ciego de `vila"),
(2185, 1056, "06", "Cienfuegos"),
(2186, 1056, "03", "Ciudad de La Habana"),
(2187, 1056, "12", "Granma"),
(2188, 1056, "14", "Guantanamo"),
(2189, 1056, "11", "Holquin"),
(2190, 1056, "02", "La Habana"),
(2191, 1056, "10", "Las Tunas"),
(2192, 1056, "04", "Matanzas"),
(2193, 1056, "01", "Pinar del Rio"),
(2194, 1056, "07", "Sancti Spiritus"),
(2195, 1056, "13", "Santiago de Cuba"),
(2196, 1056, "05", "Villa Clara"),
(2197, 1056, "99", "Isla de la Juventud"),
(2198, 1056, "PR", "Pinar del Roo"),
(2199, 1056, "CA", "Ciego de Avila"),
(2200, 1056, "CG", "Camagoey"),
(2201, 1056, "HO", "Holgun"),
(2202, 1056, "SS", "Sancti Spritus"),
(2203, 1056, "IJ", "Municipio Especial Isla de la Juventud"),
(2204, 1040, "BV", "Boa Vista"),
(2205, 1040, "BR", "Brava"),
(2206, 1040, "CS", "Calheta de Sao Miguel"),
(2207, 1040, "FO", "Fogo"),
(2208, 1040, "MA", "Maio"),
(2209, 1040, "MO", "Mosteiros"),
(2210, 1040, "PA", "Paul"),
(2211, 1040, "PN", "Porto Novo"),
(2212, 1040, "PR", "Praia"),
(2213, 1040, "RG", "Ribeira Grande"),
(2214, 1040, "SL", "Sal"),
(2215, 1040, "SD", "Sao Domingos"),
(2216, 1040, "SF", "Sao Filipe"),
(2217, 1040, "SN", "Sao Nicolau"),
(2218, 1040, "SV", "Sao Vicente"),
(2219, 1040, "TA", "Tarrafal"),
(2220, 1057, "04", "Ammochostos Magusa"),
(2221, 1057, "06", "Keryneia"),
(2222, 1057, "03", "Larnaka"),
(2223, 1057, "01", "Lefkosia"),
(2224, 1057, "02", "Lemesos"),
(2225, 1057, "05", "Pafos"),
(2226, 1058, "JC", "Jihočeský kraj"),
(2227, 1058, "JM", "Jihomoravský kraj"),
(2228, 1058, "KA", "Karlovarský kraj"),
(2229, 1058, "KR", "Královéhradecký kraj"),
(2230, 1058, "LI", "Liberecký kraj"),
(2231, 1058, "MO", "Moravskoslezský kraj"),
(2232, 1058, "OL", "Olomoucký kraj"),
(2233, 1058, "PA", "Pardubický kraj"),
(2234, 1058, "PL", "Plzeňský kraj"),
(2235, 1058, "PR", "Praha, hlavní město"),
(2236, 1058, "ST", "Středočeský kraj"),
(2237, 1058, "US", "Ústecký kraj"),
(2238, 1058, "VY", "Vysočina"),
(2239, 1058, "ZL", "Zlínský kraj"),
(2240, 1082, "BW", "Baden-Wuerttemberg"),
(2241, 1082, "BY", "Bayern"),
(2242, 1082, "HB", "Bremen"),
(2243, 1082, "HH", "Hamburg"),
(2244, 1082, "HE", "Hessen"),
(2245, 1082, "NI", "Niedersachsen"),
(2246, 1082, "NW", "Nordrhein-Westfalen"),
(2247, 1082, "RP", "Rheinland-Pfalz"),
(2248, 1082, "SL", "Saarland"),
(2249, 1082, "SH", "Schleswig-Holstein"),
(2250, 1082, "BR", "Berlin"),
(2251, 1082, "BB", "Brandenburg"),
(2252, 1082, "MV", "Mecklenburg-Vorpommern"),
(2253, 1082, "SN", "Sachsen"),
(2254, 1082, "ST", "Sachsen-Anhalt"),
(2255, 1082, "TH", "Thueringen"),
(2256, 1060, "AS", "Ali Sabiah"),
(2257, 1060, "DI", "Dikhil"),
(2258, 1060, "DJ", "Djibouti"),
(2259, 1060, "OB", "Obock"),
(2260, 1060, "TA", "Tadjoura"),
(2261, 1059, "147", "Frederikaberg municipality"),
(2262, 1059, "101", "Copenhagen municipality"),
(2263, 1059, "015", "Copenhagen"),
(2264, 1059, "020", "Frederiksborg"),
(2265, 1059, "025", "Roskilde"),
(2266, 1059, "030", "Western Zealand"),
(2267, 1059, "035", "Storstrøm"),
(2268, 1059, "040", "Bornholm"),
(2269, 1059, "042", "Funen"),
(2270, 1059, "050", "Southern Jutland"),
(2271, 1059, "055", "Ribe"),
(2272, 1059, "060", "Vejle"),
(2273, 1059, "065", "Ringkøbing"),
(2274, 1059, "070", "Aarhus"),
(2275, 1059, "076", "Viborg"),
(2276, 1059, "080", "Northern Jutland"),
(2277, 1062, "01", "Distrito Nacional (Santo Domingo)"),
(2278, 1062, "02", "Azua"),
(2279, 1062, "03", "Bahoruco"),
(2280, 1062, "04", "Barahona"),
(2281, 1062, "05", "Dajabón"),
(2282, 1062, "06", "Duarte"),
(2283, 1062, "08", "El Seybo [El Seibo]"),
(2284, 1062, "09", "Espaillat"),
(2285, 1062, "30", "Hato Mayor"),
(2286, 1062, "10", "Independencia"),
(2287, 1062, "11", "La Altagracia"),
(2288, 1062, "07", "La Estrelleta [Elias Pina]"),
(2289, 1062, "12", "La Romana"),
(2290, 1062, "13", "La Vega"),
(2291, 1062, "14", "Maroia Trinidad Sánchez"),
(2292, 1062, "28", "Monseñor Nouel"),
(2293, 1062, "15", "Monte Cristi"),
(2294, 1062, "29", "Monte Plata"),
(2295, 1062, "16", "Pedernales"),
(2296, 1062, "17", "Peravia"),
(2297, 1062, "18", "Puerto Plata"),
(2298, 1062, "19", "Salcedo"),
(2299, 1062, "20", "Samaná"),
(2300, 1062, "21", "San Cristóbal"),
(2301, 1062, "23", "San Pedro de Macorís"),
(2302, 1062, "24", "Sánchez Ramírez"),
(2303, 1062, "25", "Santiago"),
(2304, 1062, "26", "Santiago Rodríguez"),
(2305, 1062, "27", "Valverde"),
(2306, 1003, "01", "Adrar"),
(2307, 1003, "44", "Ain Defla"),
(2308, 1003, "46", "Ain Tmouchent"),
(2309, 1003, "16", "Alger"),
(2310, 1003, "23", "Annaba"),
(2311, 1003, "05", "Batna"),
(2312, 1003, "08", "Bechar"),
(2313, 1003, "06", "Bejaia"),
(2314, 1003, "07", "Biskra"),
(2315, 1003, "09", "Blida"),
(2316, 1003, "34", "Bordj Bou Arreridj"),
(2317, 1003, "10", "Bouira"),
(2318, 1003, "35", "Boumerdes"),
(2319, 1003, "02", "Chlef"),
(2320, 1003, "25", "Constantine"),
(2321, 1003, "17", "Djelfa"),
(2322, 1003, "32", "El Bayadh"),
(2323, 1003, "39", "El Oued"),
(2324, 1003, "36", "El Tarf"),
(2325, 1003, "47", "Ghardaia"),
(2326, 1003, "24", "Guelma"),
(2327, 1003, "33", "Illizi"),
(2328, 1003, "18", "Jijel"),
(2329, 1003, "40", "Khenchela"),
(2330, 1003, "03", "Laghouat"),
(2331, 1003, "29", "Mascara"),
(2332, 1003, "26", "Medea"),
(2333, 1003, "43", "Mila"),
(2334, 1003, "27", "Mostaganem"),
(2335, 1003, "28", "Msila"),
(2336, 1003, "45", "Naama"),
(2337, 1003, "31", "Oran"),
(2338, 1003, "30", "Ouargla"),
(2339, 1003, "04", "Oum el Bouaghi"),
(2340, 1003, "48", "Relizane"),
(2341, 1003, "20", "Saida"),
(2342, 1003, "19", "Setif"),
(2343, 1003, "22", "Sidi Bel Abbes"),
(2344, 1003, "21", "Skikda"),
(2345, 1003, "41", "Souk Ahras"),
(2346, 1003, "11", "Tamanghasset"),
(2347, 1003, "12", "Tebessa"),
(2348, 1003, "14", "Tiaret"),
(2349, 1003, "37", "Tindouf"),
(2350, 1003, "42", "Tipaza"),
(2351, 1003, "38", "Tissemsilt"),
(2352, 1003, "15", "Tizi Ouzou"),
(2353, 1003, "13", "Tlemcen"),
(2354, 1064, "A", "Azuay"),
(2355, 1064, "B", "Bolivar"),
(2356, 1064, "F", "Canar"),
(2357, 1064, "C", "Carchi"),
(2358, 1064, "X", "Cotopaxi"),
(2359, 1064, "H", "Chimborazo"),
(2360, 1064, "O", "El Oro"),
(2361, 1064, "E", "Esmeraldas"),
(2362, 1064, "W", "Galapagos"),
(2363, 1064, "G", "Guayas"),
(2364, 1064, "I", "Imbabura"),
(2365, 1064, "L", "Loja"),
(2366, 1064, "R", "Los Rios"),
(2367, 1064, "M", "Manabi"),
(2368, 1064, "S", "Morona-Santiago"),
(2369, 1064, "N", "Napo"),
(2370, 1064, "D", "Orellana"),
(2371, 1064, "Y", "Pastaza"),
(2372, 1064, "P", "Pichincha"),
(2373, 1064, "U", "Sucumbios"),
(2374, 1064, "T", "Tungurahua"),
(2375, 1064, "Z", "Zamora-Chinchipe"),
(2376, 1069, "37", "Harjumsa"),
(2377, 1069, "39", "Hitumea"),
(2378, 1069, "44", "Ida-Virumsa"),
(2379, 1069, "49", "Jogevamsa"),
(2380, 1069, "51", "Jarvamsa"),
(2381, 1069, "57", "Lasnemsa"),
(2382, 1069, "59", "Laane-Virumaa"),
(2383, 1069, "65", "Polvamea"),
(2384, 1069, "67", "Parnumsa"),
(2385, 1069, "70", "Raplamsa"),
(2386, 1069, "74", "Saaremsa"),
(2387, 1069, "7B", "Tartumsa"),
(2388, 1069, "82", "Valgamaa"),
(2389, 1069, "84", "Viljandimsa"),
(2390, 1069, "86", "Vorumaa"),
(2391, 1065, "DK", "Ad Daqahllyah"),
(2392, 1065, "BA", "Al Bahr al Ahmar"),
(2393, 1065, "BH", "Al Buhayrah"),
(2394, 1065, "FYM", "Al Fayym"),
(2395, 1065, "GH", "Al Gharbiyah"),
(2396, 1065, "ALX", "Al Iskandarlyah"),
(2397, 1065, "IS", "Al Isma illyah"),
(2398, 1065, "GZ", "Al Jizah"),
(2399, 1065, "MNF", "Al Minuflyah"),
(2400, 1065, "MN", "Al Minya"),
(2401, 1065, "C", "Al Qahirah"),
(2402, 1065, "KB", "Al Qalyublyah"),
(2403, 1065, "WAD", "Al Wadi al Jadid"),
(2404, 1065, "SHR", "Ash Sharqiyah"),
(2405, 1065, "SUZ", "As Suways"),
(2406, 1065, "ASN", "Aswan"),
(2407, 1065, "AST", "Asyut"),
(2408, 1065, "BNS", "Bani Suwayf"),
(2409, 1065, "PTS", "Bur Sa\'id"),
(2410, 1065, "DT", "Dumyat"),
(2411, 1065, "JS", "Janub Sina\'"),
(2412, 1065, "KFS", "Kafr ash Shaykh"),
(2413, 1065, "MT", "Matruh"),
(2414, 1065, "KN", "Qina"),
(2415, 1065, "SIN", "Shamal Sina\'"),
(2416, 1065, "SHG", "Suhaj"),
(2417, 1068, "AN", "Anseba"),
(2418, 1068, "DU", "Debub"),
(2419, 1068, "DK", "Debubawi Keyih Bahri [Debub-Keih-Bahri]"),
(2420, 1068, "GB", "Gash-Barka"),
(2421, 1068, "MA", "Maakel [Maekel]"),
(2422, 1068, "SK", "Semenawi Keyih Bahri [Semien-Keih-Bahri]"),
(2423, 1198, "VI", "Álava"),
(2424, 1198, "AB", "Albacete"),
(2425, 1198, "A", "Alicante"),
(2426, 1198, "AL", "Almería"),
(2427, 1198, "O", "Asturias"),
(2428, 1198, "AV", "Ávila"),
(2429, 1198, "BA", "Badajoz"),
(2430, 1198, "PM", "Baleares"),
(2431, 1198, "B", "Barcelona"),
(2432, 1198, "BU", "Burgos"),
(2433, 1198, "CC", "Cáceres"),
(2434, 1198, "CA", "Cádiz"),
(2435, 1198, "S", "Cantabria"),
(2436, 1198, "CS", "Castellón"),
(2437, 1198, "CR", "Ciudad Real"),
(2438, 1198, "CU", "Cuenca"),
(2439, 1198, "GE", "Girona [Gerona]"),
(2440, 1198, "GR", "Granada"),
(2441, 1198, "GU", "Guadalajara"),
(2442, 1198, "SS", "Guipúzcoa"),
(2443, 1198, "H", "Huelva"),
(2444, 1198, "HU", "Huesca"),
(2445, 1198, "J", "Jaén"),
(2446, 1198, "C", "La Coruña"),
(2447, 1198, "LO", "La Rioja"),
(2448, 1198, "GC", "Las Palmas"),
(2449, 1198, "LE", "León"),
(2450, 1198, "L", "Lleida [Lérida]"),
(2451, 1198, "LU", "Lugo"),
(2452, 1198, "M", "Madrid"),
(2453, 1198, "MA", "Málaga"),
(2454, 1198, "MU", "Murcia"),
(2455, 1198, "NA", "Navarra"),
(2456, 1198, "OR", "Ourense"),
(2457, 1198, "P", "Palencia"),
(2458, 1198, "PO", "Pontevedra"),
(2459, 1198, "SA", "Salamanca"),
(2460, 1198, "TF", "Santa Cruz de Tenerife"),
(2461, 1198, "SG", "Segovia"),
(2462, 1198, "SE", "Sevilla"),
(2463, 1198, "SO", "Soria"),
(2464, 1198, "T", "Tarragona"),
(2465, 1198, "TE", "Teruel"),
(2466, 1198, "V", "Valencia"),
(2467, 1198, "VA", "Valladolid"),
(2468, 1198, "BI", "Vizcaya"),
(2469, 1198, "ZA", "Zamora"),
(2470, 1198, "Z", "Zaragoza"),
(2471, 1198, "CE", "Ceuta"),
(2472, 1198, "ML", "Melilla"),
(2473, 1070, "AA", "Addis Ababa"),
(2474, 1070, "DD", "Dire Dawa"),
(2475, 1070, "AF", "Afar"),
(2476, 1070, "AM", "Amara"),
(2477, 1070, "BE", "Benshangul-Gumaz"),
(2478, 1070, "GA", "Gambela Peoples"),
(2479, 1070, "HA", "Harari People"),
(2480, 1070, "OR", "Oromia"),
(2481, 1070, "SO", "Somali"),
(2482, 1070, "SN", "Southern Nations, Nationalities and Peoples"),
(2483, 1070, "TI", "Tigrai"),
(2484, 1075, "AL", "Ahvenanmasn laani"),
(2485, 1075, "ES", "Etela-Suomen laani"),
(2486, 1075, "IS", "Ita-Suomen lasni"),
(2487, 1075, "LL", "Lapin Laani"),
(2488, 1075, "LS", "Lansi-Suomen Laani"),
(2489, 1075, "OL", "Oulun Lasni"),
(2490, 1074, "E", "Eastern"),
(2491, 1074, "N", "Northern"),
(2492, 1074, "W", "Western"),
(2493, 1074, "R", "Rotuma"),
(2494, 1141, "TRK", "Chuuk"),
(2495, 1141, "KSA", "Kosrae"),
(2496, 1141, "PNI", "Pohnpei"),
(2497, 1141, "YAP", "Yap"),
(2498, 1076, "01", "Ain"),
(2499, 1076, "02", "Aisne"),
(2500, 1076, "03", "Allier"),
(2501, 1076, "04", "Alpes-de-Haute-Provence"),
(2502, 1076, "06", "Alpes-Maritimes"),
(2503, 1076, "07", "Ardèche"),
(2504, 1076, "08", "Ardennes"),
(2505, 1076, "09", "Ariège"),
(2506, 1076, "10", "Aube"),
(2507, 1076, "11", "Aude"),
(2508, 1076, "12", "Aveyron"),
(2509, 1076, "67", "Bas-Rhin"),
(2510, 1076, "13", "Bouches-du-Rhône"),
(2511, 1076, "14", "Calvados"),
(2512, 1076, "15", "Cantal"),
(2513, 1076, "16", "Charente"),
(2514, 1076, "17", "Charente-Maritime"),
(2515, 1076, "18", "Cher"),
(2516, 1076, "19", "Corrèze"),
(2517, 1076, "20A", "Corse-du-Sud"),
(2518, 1076, "21", "Côte-d\'Or"),
(2519, 1076, "22", "Côtes-d\'Armor"),
(2520, 1076, "23", "Creuse"),
(2521, 1076, "79", "Deux-Sèvres"),
(2522, 1076, "24", "Dordogne"),
(2523, 1076, "25", "Doubs"),
(2524, 1076, "26", "Drôme"),
(2525, 1076, "91", "Essonne"),
(2526, 1076, "27", "Eure"),
(2527, 1076, "28", "Eure-et-Loir"),
(2528, 1076, "29", "Finistère"),
(2529, 1076, "30", "Gard"),
(2530, 1076, "32", "Gers"),
(2531, 1076, "33", "Gironde"),
(2532, 1076, "68", "Haut-Rhin"),
(2533, 1076, "20B", "Haute-Corse"),
(2534, 1076, "31", "Haute-Garonne"),
(2535, 1076, "43", "Haute-Loire"),
(2536, 1076, "70", "Haute-Saône"),
(2537, 1076, "74", "Haute-Savoie"),
(2538, 1076, "87", "Haute-Vienne"),
(2539, 1076, "05", "Hautes-Alpes"),
(2540, 1076, "65", "Hautes-Pyrénées"),
(2541, 1076, "92", "Hauts-de-Seine"),
(2542, 1076, "34", "Hérault"),
(2543, 1076, "35", "Indre"),
(2544, 1076, "36", "Ille-et-Vilaine"),
(2545, 1076, "37", "Indre-et-Loire"),
(2546, 1076, "38", "Isère"),
(2547, 1076, "40", "Landes"),
(2548, 1076, "41", "Loir-et-Cher"),
(2549, 1076, "42", "Loire"),
(2550, 1076, "44", "Loire-Atlantique"),
(2551, 1076, "45", "Loiret"),
(2552, 1076, "46", "Lot"),
(2553, 1076, "47", "Lot-et-Garonne"),
(2554, 1076, "48", "Lozère"),
(2555, 1076, "49", "Maine-et-Loire"),
(2556, 1076, "50", "Manche"),
(2557, 1076, "51", "Marne"),
(2558, 1076, "53", "Mayenne"),
(2559, 1076, "54", "Meurthe-et-Moselle"),
(2560, 1076, "55", "Meuse"),
(2561, 1076, "56", "Morbihan"),
(2562, 1076, "57", "Moselle"),
(2563, 1076, "58", "Nièvre"),
(2564, 1076, "59", "Nord"),
(2565, 1076, "60", "Oise"),
(2566, 1076, "61", "Orne"),
(2567, 1076, "75", "Paris"),
(2568, 1076, "62", "Pas-de-Calais"),
(2569, 1076, "63", "Puy-de-Dôme"),
(2570, 1076, "64", "Pyrénées-Atlantiques"),
(2571, 1076, "66", "Pyrénées-Orientales"),
(2572, 1076, "69", "Rhône"),
(2573, 1076, "71", "Saône-et-Loire"),
(2574, 1076, "72", "Sarthe"),
(2575, 1076, "73", "Savoie"),
(2576, 1076, "77", "Seine-et-Marne"),
(2577, 1076, "76", "Seine-Maritime"),
(2578, 1076, "93", "Seine-Saint-Denis"),
(2579, 1076, "80", "Somme"),
(2580, 1076, "81", "Tarn"),
(2581, 1076, "82", "Tarn-et-Garonne"),
(2582, 1076, "95", "Val d\'Oise"),
(2583, 1076, "90", "Territoire de Belfort"),
(2584, 1076, "94", "Val-de-Marne"),
(2585, 1076, "83", "Var"),
(2586, 1076, "84", "Vaucluse"),
(2587, 1076, "85", "Vendée"),
(2588, 1076, "86", "Vienne"),
(2589, 1076, "88", "Vosges"),
(2590, 1076, "89", "Yonne"),
(2591, 1076, "78", "Yvelines"),
(2592, 1226, "ABE", "Aberdeen City"),
(2593, 1226, "ABD", "Aberdeenshire"),
(2594, 1226, "ANS", "Angus"),
(2595, 1226, "ANT", "Antrim"),
(2596, 1226, "ARD", "Ards"),
(2597, 1226, "AGB", "Argyll and Bute"),
(2598, 1226, "ARM", "Armagh"),
(2599, 1226, "BLA", "Ballymena"),
(2600, 1226, "BLY", "Ballymoney"),
(2601, 1226, "BNB", "Banbridge"),
(2602, 1226, "BDG", "Barking and Dagenham"),
(2603, 1226, "BNE", "Barnet"),
(2604, 1226, "BNS", "Barnsley"),
(2605, 1226, "BAS", "Bath and North East Somerset"),
(2606, 1226, "BDF", "Bedfordshire"),
(2607, 1226, "BFS", "Belfast"),
(2608, 1226, "BEX", "Bexley"),
(2609, 1226, "BIR", "Birmingham"),
(2610, 1226, "BBD", "Blackburn with Darwen"),
(2611, 1226, "BPL", "Blackpool"),
(2612, 1226, "BGW", "Blaenau Gwent"),
(2613, 1226, "BOL", "Bolton"),
(2614, 1226, "BMH", "Bournemouth"),
(2615, 1226, "BRC", "Bracknell Forest"),
(2616, 1226, "BRD", "Bradford"),
(2617, 1226, "BEN", "Brent"),
(2618, 1226, "BGE", "Bridgend"),
(2619, 1226, "BNH", "Brighton and Hove"),
(2620, 1226, "BST", "Bristol, City of"),
(2621, 1226, "BRY", "Bromley"),
(2622, 1226, "BKM", "Buckinghamshire"),
(2623, 1226, "BUR", "Bury"),
(2624, 1226, "CAY", "Caerphilly"),
(2625, 1226, "CLD", "Calderdale"),
(2626, 1226, "CAM", "Cambridgeshire"),
(2627, 1226, "CMD", "Camden"),
(2628, 1226, "CRF", "Cardiff"),
(2629, 1226, "CMN", "Carmarthenshire"),
(2630, 1226, "GFY", "Sir Gaerfyrddin"),
(2631, 1226, "CKF", "Carrickfergus"),
(2632, 1226, "CSR", "Castlereagh"),
(2633, 1226, "CGN", "Ceredigion"),
(2634, 1226, "CHS", "Cheshire"),
(2635, 1226, "CLK", "Clackmannanshire"),
(2636, 1226, "CLR", "Coleraine"),
(2637, 1226, "CWY", "Conwy"),
(2638, 1226, "CKT", "Cookstown"),
(2639, 1226, "CON", "Cornwall"),
(2640, 1226, "COV", "Coventry"),
(2641, 1226, "CGV", "Cralgavon"),
(2642, 1226, "CRY", "Croydon"),
(2643, 1226, "CMA", "Cumbria"),
(2644, 1226, "DAL", "Darlington"),
(2645, 1226, "DEN", "Denbighshire"),
(2646, 1226, "DER", "Derby"),
(2647, 1226, "DBY", "Derbyshire"),
(2648, 1226, "DRY", "Derry"),
(2649, 1226, "DEV", "Devon"),
(2650, 1226, "DNC", "Doncaster"),
(2651, 1226, "DOR", "Dorset"),
(2652, 1226, "DOW", "Down"),
(2653, 1226, "DUD", "Dudley"),
(2654, 1226, "DGY", "Dumfries and Galloway"),
(2655, 1226, "DND", "Dundee City"),
(2656, 1226, "DGN", "Dungannon"),
(2657, 1226, "DUR", "Durham"),
(2658, 1226, "EAL", "Ealing"),
(2659, 1226, "EAY", "East Ayrshire"),
(2660, 1226, "EDU", "East Dunbartonshire"),
(2661, 1226, "ELN", "East Lothian"),
(2662, 1226, "ERW", "East Renfrewshire"),
(2663, 1226, "ERY", "East Riding of Yorkshire"),
(2664, 1226, "ESX", "East Sussex"),
(2665, 1226, "EDH", "Edinburgh, City of"),
(2666, 1226, "ELS", "Eilean Siar"),
(2667, 1226, "ENF", "Enfield"),
(2668, 1226, "ESS", "Essex"),
(2669, 1226, "FAL", "Falkirk"),
(2670, 1226, "FER", "Fermanagh"),
(2671, 1226, "FIF", "Fife"),
(2672, 1226, "FLN", "Flintshire"),
(2673, 1226, "GAT", "Gateshead"),
(2674, 1226, "GLG", "Glasgow City"),
(2675, 1226, "GLS", "Gloucestershire"),
(2676, 1226, "GRE", "Greenwich"),
(2677, 1226, "GSY", "Guernsey"),
(2678, 1226, "GWN", "Gwynedd"),
(2679, 1226, "HCK", "Hackney"),
(2680, 1226, "HAL", "Halton"),
(2681, 1226, "HMF", "Hammersmith and Fulham"),
(2682, 1226, "HAM", "Hampshire"),
(2683, 1226, "HRY", "Haringey"),
(2684, 1226, "HRW", "Harrow"),
(2685, 1226, "HPL", "Hartlepool"),
(2686, 1226, "HAV", "Havering"),
(2687, 1226, "HEF", "Herefordshire, County of"),
(2688, 1226, "HRT", "Hertfordshire"),
(2689, 1226, "HED", "Highland"),
(2690, 1226, "HIL", "Hillingdon"),
(2691, 1226, "HNS", "Hounslow"),
(2692, 1226, "IVC", "Inverclyde"),
(2693, 1226, "AGY", "Isle of Anglesey"),
(2694, 1226, "IOW", "Isle of Wight"),
(2695, 1226, "IOS", "Isles of Scilly"),
(2696, 1226, "ISL", "Islington"),
(2697, 1226, "JSY", "Jersey"),
(2698, 1226, "KEC", "Kensington and Chelsea"),
(2699, 1226, "KEN", "Kent"),
(2700, 1226, "KHL", "Kingston upon Hull, City of"),
(2701, 1226, "KTT", "Kingston upon Thames"),
(2702, 1226, "KIR", "Kirklees"),
(2703, 1226, "KWL", "Knowsley"),
(2704, 1226, "LBH", "Lambeth"),
(2705, 1226, "LAN", "Lancashire"),
(2706, 1226, "LRN", "Larne"),
(2707, 1226, "LDS", "Leeds"),
(2708, 1226, "LCE", "Leicester"),
(2709, 1226, "LEC", "Leicestershire"),
(2710, 1226, "LEW", "Lewisham"),
(2711, 1226, "LMV", "Limavady"),
(2712, 1226, "LIN", "Lincolnshire"),
(2713, 1226, "LSB", "Lisburn"),
(2714, 1226, "LIV", "Liverpool"),
(2715, 1226, "LND", "London, City of"),
(2716, 1226, "LUT", "Luton"),
(2717, 1226, "MFT", "Magherafelt"),
(2718, 1226, "MAN", "Manchester"),
(2719, 1226, "MDW", "Medway"),
(2720, 1226, "MTY", "Merthyr Tydfil"),
(2721, 1226, "MRT", "Merton"),
(2722, 1226, "MDB", "Middlesbrough"),
(2723, 1226, "MLN", "Midlothian"),
(2724, 1226, "MIK", "Milton Keynes"),
(2725, 1226, "MON", "Monmouthshire"),
(2726, 1226, "MRY", "Moray"),
(2727, 1226, "MYL", "Moyle"),
(2728, 1226, "NTL", "Neath Port Talbot"),
(2729, 1226, "NET", "Newcastle upon Tyne"),
(2730, 1226, "NWM", "Newham"),
(2731, 1226, "NWP", "Newport"),
(2732, 1226, "NYM", "Newry and Mourne"),
(2733, 1226, "NTA", "Newtownabbey"),
(2734, 1226, "NFK", "Norfolk"),
(2735, 1226, "NAY", "North Ayrahire"),
(2736, 1226, "NDN", "North Down"),
(2737, 1226, "NEL", "North East Lincolnshire"),
(2738, 1226, "NLK", "North Lanarkshire"),
(2739, 1226, "NLN", "North Lincolnshire"),
(2740, 1226, "NSM", "North Somerset"),
(2741, 1226, "NTY", "North Tyneside"),
(2742, 1226, "NYK", "North Yorkshire"),
(2743, 1226, "NTH", "Northamptonshire"),
(2744, 1226, "NBL", "Northumbarland"),
(2745, 1226, "NGM", "Nottingham"),
(2746, 1226, "NTT", "Nottinghamshire"),
(2747, 1226, "OLD", "Oldham"),
(2748, 1226, "OMH", "Omagh"),
(2749, 1226, "ORR", "Orkney Islands"),
(2750, 1226, "OXF", "Oxfordshire"),
(2751, 1226, "PEM", "Pembrokeshire"),
(2752, 1226, "PKN", "Perth and Kinross"),
(2753, 1226, "PTE", "Peterborough"),
(2754, 1226, "PLY", "Plymouth"),
(2755, 1226, "POL", "Poole"),
(2756, 1226, "POR", "Portsmouth"),
(2757, 1226, "POW", "Powys"),
(2758, 1226, "RDG", "Reading"),
(2759, 1226, "RDB", "Redbridge"),
(2760, 1226, "RCC", "Redcar and Cleveland"),
(2761, 1226, "RFW", "Renfrewshlre"),
(2762, 1226, "RCT", "Rhondda, Cynon, Taff"),
(2763, 1226, "RIC", "Richmond upon Thames"),
(2764, 1226, "RCH", "Rochdale"),
(2765, 1226, "ROT", "Rotherham"),
(2766, 1226, "RUT", "Rutland"),
(2767, 1226, "SHN", "St. Helens"),
(2768, 1226, "SLF", "Salford"),
(2769, 1226, "SAW", "Sandwell"),
(2770, 1226, "SCB", "Scottish Borders, The"),
(2771, 1226, "SFT", "Sefton"),
(2772, 1226, "SHF", "Sheffield"),
(2773, 1226, "ZET", "Shetland Islands"),
(2774, 1226, "SHR", "Shropshire"),
(2775, 1226, "SLG", "Slough"),
(2776, 1226, "SOL", "Solihull"),
(2777, 1226, "SOM", "merset"),
(2778, 1226, "SAY", "South Ayrshire"),
(2779, 1226, "SGC", "South Gloucestershire"),
(2780, 1226, "SLK", "South Lanarkshire"),
(2781, 1226, "STY", "South Tyneside"),
(2782, 1226, "STH", "Southampton"),
(2783, 1226, "SOS", "Southend-on-Sea"),
(2784, 1226, "SWK", "Southwark"),
(2785, 1226, "STS", "Staffordshire"),
(2786, 1226, "STG", "Stirling"),
(2787, 1226, "SKP", "Stockport"),
(2788, 1226, "STT", "Stockton-on-Tees"),
(2789, 1226, "STE", "Stoke-on-Trent"),
(2790, 1226, "STB", "Strabane"),
(2791, 1226, "SFK", "Suffolk"),
(2792, 1226, "SND", "Sunderland"),
(2793, 1226, "SRY", "Surrey"),
(2794, 1226, "STN", "Sutton"),
(2795, 1226, "SWA", "Swansea"),
(2796, 1226, "SWD", "Swindon"),
(2797, 1226, "TAM", "Tameside"),
(2798, 1226, "TFW", "Telford and Wrekin"),
(2799, 1226, "THR", "Thurrock"),
(2800, 1226, "TOB", "Torbay"),
(2801, 1226, "TOF", "Torfasn"),
(2802, 1226, "TWH", "Tower Hamlets"),
(2803, 1226, "TRF", "Trafford"),
(2804, 1226, "VGL", "Vale of Glamorgan, The"),
(2805, 1226, "BMG", "Bro Morgannwg"),
(2806, 1226, "WKF", "Wakefield"),
(2807, 1226, "WLL", "Walsall"),
(2808, 1226, "WFT", "Waltham Forest"),
(2809, 1226, "WND", "Wandsworth"),
(2810, 1226, "WRT", "Warrington"),
(2811, 1226, "WAR", "Warwickshire"),
(2812, 1226, "WBX", "West Berkshire"),
(2813, 1226, "WDU", "West Dunbartonshire"),
(2814, 1226, "WLN", "West Lothian"),
(2815, 1226, "WSX", "West Sussex"),
(2816, 1226, "WSM", "Westminster"),
(2817, 1226, "WGN", "Wigan"),
(2818, 1226, "WIL", "Wiltshire"),
(2819, 1226, "WNM", "Windsor and Maidenhead"),
(2820, 1226, "WRL", "Wirral"),
(2821, 1226, "WOK", "Wokingham"),
(2822, 1226, "WLV", "Wolverhampton"),
(2823, 1226, "WOR", "Worcestershire"),
(2824, 1226, "WRX", "Wrexham"),
(2825, 1226, "YOR", "York"),
(2826, 1083, "AH", "Ashanti"),
(2827, 1083, "BA", "Brong-Ahafo"),
(2828, 1083, "AA", "Greater Accra"),
(2829, 1083, "UE", "Upper East"),
(2830, 1083, "UW", "Upper West"),
(2831, 1083, "TV", "Volta"),
(2832, 1213, "B", "Banjul"),
(2833, 1213, "L", "Lower River"),
(2834, 1213, "M", "MacCarthy Island"),
(2835, 1213, "N", "North Bank"),
(2836, 1213, "U", "Upper River"),
(2837, 1091, "BE", "Beyla"),
(2838, 1091, "BF", "Boffa"),
(2839, 1091, "BK", "Boke"),
(2840, 1091, "CO", "Coyah"),
(2841, 1091, "DB", "Dabola"),
(2842, 1091, "DL", "Dalaba"),
(2843, 1091, "DI", "Dinguiraye"),
(2844, 1091, "DU", "Dubreka"),
(2845, 1091, "FA", "Faranah"),
(2846, 1091, "FO", "Forecariah"),
(2847, 1091, "FR", "Fria"),
(2848, 1091, "GA", "Gaoual"),
(2849, 1091, "GU", "Guekedou"),
(2850, 1091, "KA", "Kankan"),
(2851, 1091, "KE", "Kerouane"),
(2852, 1091, "KD", "Kindia"),
(2853, 1091, "KS", "Kissidougou"),
(2854, 1091, "KB", "Koubia"),
(2855, 1091, "KN", "Koundara"),
(2856, 1091, "KO", "Kouroussa"),
(2857, 1091, "LA", "Labe"),
(2858, 1091, "LE", "Lelouma"),
(2859, 1091, "LO", "Lola"),
(2860, 1091, "MC", "Macenta"),
(2861, 1091, "ML", "Mali"),
(2862, 1091, "MM", "Mamou"),
(2863, 1091, "MD", "Mandiana"),
(2864, 1091, "NZ", "Nzerekore"),
(2865, 1091, "PI", "Pita"),
(2866, 1091, "SI", "Siguiri"),
(2867, 1091, "TE", "Telimele"),
(2868, 1091, "TO", "Tougue"),
(2869, 1091, "YO", "Yomou"),
(2870, 1067, "C", "Region Continental"),
(2871, 1067, "I", "Region Insular"),
(2872, 1067, "AN", "Annobon"),
(2873, 1067, "BN", "Bioko Norte"),
(2874, 1067, "BS", "Bioko Sur"),
(2875, 1067, "CS", "Centro Sur"),
(2876, 1067, "KN", "Kie-Ntem"),
(2877, 1067, "LI", "Litoral"),
(2878, 1067, "WN", "Wele-Nzas"),
(2879, 1085, "13", "Achaa"),
(2880, 1085, "01", "Aitolia-Akarnania"),
(2881, 1085, "11", "Argolis"),
(2882, 1085, "12", "Arkadia"),
(2883, 1085, "31", "Arta"),
(2884, 1085, "A1", "Attiki"),
(2885, 1085, "64", "Chalkidiki"),
(2886, 1085, "94", "Chania"),
(2887, 1085, "85", "Chios"),
(2888, 1085, "81", "Dodekanisos"),
(2889, 1085, "52", "Drama"),
(2890, 1085, "71", "Evros"),
(2891, 1085, "05", "Evrytania"),
(2892, 1085, "04", "Evvoia"),
(2893, 1085, "63", "Florina"),
(2894, 1085, "07", "Fokis"),
(2895, 1085, "06", "Fthiotis"),
(2896, 1085, "51", "Grevena"),
(2897, 1085, "14", "Ileia"),
(2898, 1085, "53", "Imathia"),
(2899, 1085, "33", "Ioannina"),
(2900, 1085, "91", "Irakleion"),
(2901, 1085, "41", "Karditsa"),
(2902, 1085, "56", "Kastoria"),
(2903, 1085, "55", "Kavalla"),
(2904, 1085, "23", "Kefallinia"),
(2905, 1085, "22", "Kerkyra"),
(2906, 1085, "57", "Kilkis"),
(2907, 1085, "15", "Korinthia"),
(2908, 1085, "58", "Kozani"),
(2909, 1085, "82", "Kyklades"),
(2910, 1085, "16", "Lakonia"),
(2911, 1085, "42", "Larisa"),
(2912, 1085, "92", "Lasithion"),
(2913, 1085, "24", "Lefkas"),
(2914, 1085, "83", "Lesvos"),
(2915, 1085, "43", "Magnisia"),
(2916, 1085, "17", "Messinia"),
(2917, 1085, "59", "Pella"),
(2918, 1085, "34", "Preveza"),
(2919, 1085, "93", "Rethymnon"),
(2920, 1085, "73", "Rodopi"),
(2921, 1085, "84", "Samos"),
(2922, 1085, "62", "Serrai"),
(2923, 1085, "32", "Thesprotia"),
(2924, 1085, "54", "Thessaloniki"),
(2925, 1085, "44", "Trikala"),
(2926, 1085, "03", "Voiotia"),
(2927, 1085, "72", "Xanthi"),
(2928, 1085, "21", "Zakynthos"),
(2929, 1085, "69", "Agio Oros"),
(2930, 1090, "AV", "Alta Verapez"),
(2931, 1090, "BV", "Baja Verapez"),
(2932, 1090, "CM", "Chimaltenango"),
(2933, 1090, "CQ", "Chiquimula"),
(2934, 1090, "PR", "El Progreso"),
(2935, 1090, "ES", "Escuintla"),
(2936, 1090, "GU", "Guatemala"),
(2937, 1090, "HU", "Huehuetenango"),
(2938, 1090, "IZ", "Izabal"),
(2939, 1090, "JA", "Jalapa"),
(2940, 1090, "JU", "Jutiapa"),
(2941, 1090, "PE", "Peten"),
(2942, 1090, "QZ", "Quetzaltenango"),
(2943, 1090, "QC", "Quiche"),
(2944, 1090, "RE", "Reta.thuleu"),
(2945, 1090, "SA", "Sacatepequez"),
(2946, 1090, "SM", "San Marcos"),
(2947, 1090, "SR", "Santa Rosa"),
(2948, 1090, "SO", "Solol6"),
(2949, 1090, "SU", "Suchitepequez"),
(2950, 1090, "TO", "Totonicapan"),
(2951, 1090, "ZA", "Zacapa"),
(2952, 1092, "BS", "Bissau"),
(2953, 1092, "BA", "Bafata"),
(2954, 1092, "BM", "Biombo"),
(2955, 1092, "BL", "Bolama"),
(2956, 1092, "CA", "Cacheu"),
(2957, 1092, "GA", "Gabu"),
(2958, 1092, "OI", "Oio"),
(2959, 1092, "QU", "Quloara"),
(2960, 1092, "TO", "Tombali S"),
(2961, 1093, "BA", "Barima-Waini"),
(2962, 1093, "CU", "Cuyuni-Mazaruni"),
(2963, 1093, "DE", "Demerara-Mahaica"),
(2964, 1093, "EB", "East Berbice-Corentyne"),
(2965, 1093, "ES", "Essequibo Islands-West Demerara"),
(2966, 1093, "MA", "Mahaica-Berbice"),
(2967, 1093, "PM", "Pomeroon-Supenaam"),
(2968, 1093, "PT", "Potaro-Siparuni"),
(2969, 1093, "UD", "Upper Demerara-Berbice"),
(2970, 1093, "UT", "Upper Takutu-Upper Essequibo"),
(2971, 1097, "AT", "Atlantida"),
(2972, 1097, "CL", "Colon"),
(2973, 1097, "CM", "Comayagua"),
(2974, 1097, "CP", "Copan"),
(2975, 1097, "CR", "Cortes"),
(2976, 1097, "CH", "Choluteca"),
(2977, 1097, "EP", "El Paraiso"),
(2978, 1097, "FM", "Francisco Morazan"),
(2979, 1097, "GD", "Gracias a Dios"),
(2980, 1097, "IN", "Intibuca"),
(2981, 1097, "IB", "Islas de la Bahia"),
(2982, 1097, "LE", "Lempira"),
(2983, 1097, "OC", "Ocotepeque"),
(2984, 1097, "OL", "Olancho"),
(2985, 1097, "SB", "Santa Barbara"),
(2986, 1097, "VA", "Valle"),
(2987, 1097, "YO", "Yoro"),
(2988, 1055, "07", "Bjelovarsko-bilogorska zupanija"),
(2989, 1055, "12", "Brodsko-posavska zupanija"),
(2990, 1055, "19", "Dubrovacko-neretvanska zupanija"),
(2991, 1055, "18", "Istarska zupanija"),
(2992, 1055, "04", "Karlovacka zupanija"),
(2993, 1055, "06", "Koprivnickco-krizevacka zupanija"),
(2994, 1055, "02", "Krapinako-zagorska zupanija"),
(2995, 1055, "09", "Licko-senjska zupanija"),
(2996, 1055, "20", "Medimurska zupanija"),
(2997, 1055, "14", "Osjecko-baranjska zupanija"),
(2998, 1055, "11", "Pozesko-slavonska zupanija"),
(2999, 1055, "08", "Primorsko-goranska zupanija"),
(3000, 1055, "03", "Sisacko-moelavacka Iupanija"),
(3001, 1055, "17", "Splitako-dalmatinska zupanija"),
(3002, 1055, "15", "Sibenako-kninska zupanija"),
(3003, 1055, "05", "Varaidinska zupanija"),
(3004, 1055, "10", "VirovitiEko-podravska zupanija"),
(3005, 1055, "16", "VuRovarako-srijemska zupanija"),
(3006, 1055, "13", "Zadaraka"),
(3007, 1055, "01", "Zagrebacka zupanija"),
(3008, 1094, "GA", "Grande-Anse"),
(3009, 1094, "NE", "Nord-Eat"),
(3010, 1094, "NO", "Nord-Ouest"),
(3011, 1094, "OU", "Ouest"),
(3012, 1094, "SD", "Sud"),
(3013, 1094, "SE", "Sud-Est"),
(3014, 1099, "BU", "Budapest"),
(3015, 1099, "BK", "Bács-Kiskun"),
(3016, 1099, "BA", "Baranya"),
(3017, 1099, "BE", "Békés"),
(3018, 1099, "BZ", "Borsod-Abaúj-Zemplén"),
(3019, 1099, "CS", "Csongrád"),
(3020, 1099, "FE", "Fejér"),
(3021, 1099, "GS", "Győr-Moson-Sopron"),
(3022, 1099, "HB", "Hajdu-Bihar"),
(3023, 1099, "HE", "Heves"),
(3024, 1099, "JN", "Jász-Nagykun-Szolnok"),
(3025, 1099, "KE", "Komárom-Esztergom"),
(3026, 1099, "NO", "Nográd"),
(3027, 1099, "PE", "Pest"),
(3028, 1099, "SO", "Somogy"),
(3029, 1099, "SZ", "Szabolcs-Szatmár-Bereg"),
(3030, 1099, "TO", "Tolna"),
(3031, 1099, "VA", "Vas"),
(3032, 1099, "VE", "Veszprém"),
(3033, 1099, "ZA", "Zala"),
(3034, 1099, "BC", "Békéscsaba"),
(3035, 1099, "DE", "Debrecen"),
(3036, 1099, "DU", "Dunaújváros"),
(3037, 1099, "EG", "Eger"),
(3038, 1099, "GY", "Győr"),
(3039, 1099, "HV", "Hódmezővásárhely"),
(3040, 1099, "KV", "Kaposvár"),
(3041, 1099, "KM", "Kecskemét"),
(3042, 1099, "MI", "Miskolc"),
(3043, 1099, "NK", "Nagykanizsa"),
(3044, 1099, "NY", "Nyiregyháza"),
(3045, 1099, "PS", "Pécs"),
(3046, 1099, "ST", "Salgótarján"),
(3047, 1099, "SN", "Sopron"),
(3048, 1099, "SD", "Szeged"),
(3049, 1099, "SF", "Székesfehérvár"),
(3050, 1099, "SS", "Szekszárd"),
(3051, 1099, "SK", "Szolnok"),
(3052, 1099, "SH", "Szombathely"),
(3053, 1099, "TB", "Tatabánya"),
(3054, 1099, "ZE", "Zalaegerszeg"),
(3055, 1102, "BA", "Bali"),
(3056, 1102, "BB", "Bangka Belitung"),
(3057, 1102, "BT", "Banten"),
(3058, 1102, "BE", "Bengkulu"),
(3059, 1102, "GO", "Gorontalo"),
(3060, 1102, "IJ", "Irian Jaya"),
(3061, 1102, "JA", "Jambi"),
(3062, 1102, "JB", "Jawa Barat"),
(3063, 1102, "JT", "Jawa Tengah"),
(3064, 1102, "JI", "Jawa Timur"),
(3065, 1102, "KB", "Kalimantan Barat"),
(3066, 1102, "KT", "Kalimantan Timur"),
(3067, 1102, "KS", "Kalimantan Selatan"),
(3068, 1102, "KR", "Kepulauan Riau"),
(3069, 1102, "LA", "Lampung"),
(3070, 1102, "MA", "Maluku"),
(3071, 1102, "MU", "Maluku Utara"),
(3072, 1102, "NB", "Nusa Tenggara Barat"),
(3073, 1102, "NT", "Nusa Tenggara Timur"),
(3074, 1102, "PA", "Papua"),
(3075, 1102, "RI", "Riau"),
(3076, 1102, "SN", "Sulawesi Selatan"),
(3077, 1102, "ST", "Sulawesi Tengah"),
(3078, 1102, "SG", "Sulawesi Tenggara"),
(3079, 1102, "SA", "Sulawesi Utara"),
(3080, 1102, "SB", "Sumatra Barat"),
(3081, 1102, "SS", "Sumatra Selatan"),
(3082, 1102, "SU", "Sumatera Utara"),
(3083, 1102, "JK", "Jakarta Raya"),
(3084, 1102, "AC", "Aceh"),
(3085, 1102, "YO", "Yogyakarta"),
(3086, 1105, "C", "Cork"),
(3087, 1105, "CE", "Clare"),
(3088, 1105, "CN", "Cavan"),
(3089, 1105, "CW", "Carlow"),
(3090, 1105, "D", "Dublin"),
(3091, 1105, "DL", "Donegal"),
(3092, 1105, "G", "Galway"),
(3093, 1105, "KE", "Kildare"),
(3094, 1105, "KK", "Kilkenny"),
(3095, 1105, "KY", "Kerry"),
(3096, 1105, "LD", "Longford"),
(3097, 1105, "LH", "Louth"),
(3098, 1105, "LK", "Limerick"),
(3099, 1105, "LM", "Leitrim"),
(3100, 1105, "LS", "Laois"),
(3101, 1105, "MH", "Meath"),
(3102, 1105, "MN", "Monaghan"),
(3103, 1105, "MO", "Mayo"),
(3104, 1105, "OY", "Offaly"),
(3105, 1105, "RN", "Roscommon"),
(3106, 1105, "SO", "Sligo"),
(3107, 1105, "TA", "Tipperary"),
(3108, 1105, "WD", "Waterford"),
(3109, 1105, "WH", "Westmeath"),
(3110, 1105, "WW", "Wicklow"),
(3111, 1105, "WX", "Wexford"),
(3112, 1106, "D", "HaDarom"),
(3113, 1106, "M", "HaMerkaz"),
(3114, 1106, "Z", "HaZafon"),
(3115, 1106, "HA", "Hefa"),
(3116, 1106, "TA", "Tel-Aviv"),
(3117, 1106, "JM", "Yerushalayim Al Quds"),
(3118, 1104, "AN", "Al Anbar"),
(3119, 1104, "BA", "Al Ba,rah"),
(3120, 1104, "MU", "Al Muthanna"),
(3121, 1104, "QA", "Al Qadisiyah"),
(3122, 1104, "NA", "An Najef"),
(3123, 1104, "AR", "Arbil"),
(3124, 1104, "SW", "As Sulaymaniyah"),
(3125, 1104, "TS", "At Ta\'mim"),
(3126, 1104, "BB", "Babil"),
(3127, 1104, "BG", "Baghdad"),
(3128, 1104, "DA", "Dahuk"),
(3129, 1104, "DQ", "Dhi Qar"),
(3130, 1104, "DI", "Diyala"),
(3131, 1104, "KA", "Karbala\'"),
(3132, 1104, "MA", "Maysan"),
(3133, 1104, "NI", "Ninawa"),
(3134, 1104, "SD", "Salah ad Din"),
(3135, 1104, "WA", "Wasit"),
(3136, 1103, "03", "Ardabil"),
(3137, 1103, "02", "Azarbayjan-e Gharbi"),
(3138, 1103, "01", "Azarbayjan-e Sharqi"),
(3139, 1103, "06", "Bushehr"),
(3140, 1103, "08", "Chahar Mahall va Bakhtiari"),
(3141, 1103, "04", "Esfahan"),
(3142, 1103, "14", "Fars"),
(3143, 1103, "19", "Gilan"),
(3144, 1103, "27", "Golestan"),
(3145, 1103, "24", "Hamadan"),
(3146, 1103, "23", "Hormozgan"),
(3147, 1103, "05", "Iiam"),
(3148, 1103, "15", "Kerman"),
(3149, 1103, "17", "Kermanshah"),
(3150, 1103, "09", "Khorasan"),
(3151, 1103, "10", "Khuzestan"),
(3152, 1103, "18", "Kohjiluyeh va Buyer Ahmad"),
(3153, 1103, "16", "Kordestan"),
(3154, 1103, "20", "Lorestan"),
(3155, 1103, "22", "Markazi"),
(3156, 1103, "21", "Mazandaran"),
(3157, 1103, "28", "Qazvin"),
(3158, 1103, "26", "Qom"),
(3159, 1103, "12", "Semnan"),
(3160, 1103, "13", "Sistan va Baluchestan"),
(3161, 1103, "07", "Tehran"),
(3162, 1103, "25", "Yazd"),
(3163, 1103, "11", "Zanjan"),
(3164, 1100, "7", "Austurland"),
(3165, 1100, "1", "Hofuoborgarsvaeoi utan Reykjavikur"),
(3166, 1100, "6", "Norourland eystra"),
(3167, 1100, "5", "Norourland vestra"),
(3168, 1100, "0", "Reykjavik"),
(3169, 1100, "8", "Suourland"),
(3170, 1100, "2", "Suournes"),
(3171, 1100, "4", "Vestfirolr"),
(3172, 1100, "3", "Vesturland"),
(3173, 1107, "AG", "Agrigento"),
(3174, 1107, "AL", "Alessandria"),
(3175, 1107, "AN", "Ancona"),
(3176, 1107, "AO", "Aosta"),
(3177, 1107, "AR", "Arezzo"),
(3178, 1107, "AP", "Ascoli Piceno"),
(3179, 1107, "AT", "Asti"),
(3180, 1107, "AV", "Avellino"),
(3181, 1107, "BA", "Bari"),
(3182, 1107, "BL", "Belluno"),
(3183, 1107, "BN", "Benevento"),
(3184, 1107, "BG", "Bergamo"),
(3185, 1107, "BI", "Biella"),
(3186, 1107, "BO", "Bologna"),
(3187, 1107, "BZ", "Bolzano"),
(3188, 1107, "BS", "Brescia"),
(3189, 1107, "BR", "Brindisi"),
(3190, 1107, "CA", "Cagliari"),
(3191, 1107, "CL", "Caltanissetta"),
(3192, 1107, "CB", "Campobasso"),
(3193, 1107, "CE", "Caserta"),
(3194, 1107, "CT", "Catania"),
(3195, 1107, "CZ", "Catanzaro"),
(3196, 1107, "CH", "Chieti"),
(3197, 1107, "CO", "Como"),
(3198, 1107, "CS", "Cosenza"),
(3199, 1107, "CR", "Cremona"),
(3200, 1107, "KR", "Crotone"),
(3201, 1107, "CN", "Cuneo"),
(3202, 1107, "EN", "Enna"),
(3203, 1107, "FE", "Ferrara"),
(3204, 1107, "FI", "Firenze"),
(3205, 1107, "FG", "Foggia"),
(3206, 1107, "FO", "Forli"),
(3207, 1107, "FR", "Frosinone"),
(3208, 1107, "GE", "Genova"),
(3209, 1107, "GO", "Gorizia"),
(3210, 1107, "GR", "Grosseto"),
(3211, 1107, "IM", "Imperia"),
(3212, 1107, "IS", "Isernia"),
(3213, 1107, "AQ", "L\'Aquila"),
(3214, 1107, "SP", "La Spezia"),
(3215, 1107, "LT", "Latina"),
(3216, 1107, "LE", "Lecce"),
(3217, 1107, "LC", "Lecco"),
(3218, 1107, "LI", "Livorno"),
(3219, 1107, "LO", "Lodi"),
(3220, 1107, "LU", "Lucca"),
(3221, 1107, "SC", "Macerata"),
(3222, 1107, "MN", "Mantova"),
(3223, 1107, "MS", "Massa-Carrara"),
(3224, 1107, "MT", "Matera"),
(3225, 1107, "ME", "Messina"),
(3226, 1107, "MI", "Milano"),
(3227, 1107, "MO", "Modena"),
(3228, 1107, "NA", "Napoli"),
(3229, 1107, "NO", "Novara"),
(3230, 1107, "NU", "Nuoro"),
(3231, 1107, "OR", "Oristano"),
(3232, 1107, "PD", "Padova"),
(3233, 1107, "PA", "Palermo"),
(3234, 1107, "PR", "Parma"),
(3235, 1107, "PV", "Pavia"),
(3236, 1107, "PG", "Perugia"),
(3237, 1107, "PS", "Pesaro e Urbino"),
(3238, 1107, "PE", "Pescara"),
(3239, 1107, "PC", "Piacenza"),
(3240, 1107, "PI", "Pisa"),
(3241, 1107, "PT", "Pistoia"),
(3242, 1107, "PN", "Pordenone"),
(3243, 1107, "PZ", "Potenza"),
(3244, 1107, "PO", "Prato"),
(3245, 1107, "RG", "Ragusa"),
(3246, 1107, "RA", "Ravenna"),
(3247, 1107, "RC", "Reggio Calabria"),
(3248, 1107, "RE", "Reggio Emilia"),
(3249, 1107, "RI", "Rieti"),
(3250, 1107, "RN", "Rimini"),
(3251, 1107, "RM", "Roma"),
(3252, 1107, "RO", "Rovigo"),
(3253, 1107, "SA", "Salerno"),
(3254, 1107, "SS", "Sassari"),
(3255, 1107, "SV", "Savona"),
(3256, 1107, "SI", "Siena"),
(3257, 1107, "SR", "Siracusa"),
(3258, 1107, "SO", "Sondrio"),
(3259, 1107, "TA", "Taranto"),
(3260, 1107, "TE", "Teramo"),
(3261, 1107, "TR", "Terni"),
(3262, 1107, "TO", "Torino"),
(3263, 1107, "TP", "Trapani"),
(3264, 1107, "TN", "Trento"),
(3265, 1107, "TV", "Treviso"),
(3266, 1107, "TS", "Trieste"),
(3267, 1107, "UD", "Udine"),
(3268, 1107, "VA", "Varese"),
(3269, 1107, "VE", "Venezia"),
(3270, 1107, "VB", "Verbano-Cusio-Ossola"),
(3271, 1107, "VC", "Vercelli"),
(3272, 1107, "VR", "Verona"),
(3273, 1107, "VV", "Vibo Valentia"),
(3274, 1107, "VI", "Vicenza"),
(3275, 1107, "VT", "Viterbo"),
(3276, 1109, "23", "Aichi"),
(3277, 1109, "05", "Akita"),
(3278, 1109, "02", "Aomori"),
(3279, 1109, "12", "Chiba"),
(3280, 1109, "38", "Ehime"),
(3281, 1109, "18", "Fukui"),
(3282, 1109, "40", "Fukuoka"),
(3283, 1109, "07", "Fukusima"),
(3284, 1109, "21", "Gifu"),
(3285, 1109, "10", "Gunma"),
(3286, 1109, "34", "Hiroshima"),
(3287, 1109, "01", "Hokkaido"),
(3288, 1109, "28", "Hyogo"),
(3289, 1109, "08", "Ibaraki"),
(3290, 1109, "17", "Ishikawa"),
(3291, 1109, "03", "Iwate"),
(3292, 1109, "37", "Kagawa"),
(3293, 1109, "46", "Kagoshima"),
(3294, 1109, "14", "Kanagawa"),
(3295, 1109, "39", "Kochi"),
(3296, 1109, "43", "Kumamoto"),
(3297, 1109, "26", "Kyoto"),
(3298, 1109, "24", "Mie"),
(3299, 1109, "04", "Miyagi"),
(3300, 1109, "45", "Miyazaki"),
(3301, 1109, "20", "Nagano"),
(3302, 1109, "42", "Nagasaki"),
(3303, 1109, "29", "Nara"),
(3304, 1109, "15", "Niigata"),
(3305, 1109, "44", "Oita"),
(3306, 1109, "33", "Okayama"),
(3307, 1109, "47", "Okinawa"),
(3308, 1109, "27", "Osaka"),
(3309, 1109, "41", "Saga"),
(3310, 1109, "11", "Saitama"),
(3311, 1109, "25", "Shiga"),
(3312, 1109, "32", "Shimane"),
(3313, 1109, "22", "Shizuoka"),
(3314, 1109, "09", "Tochigi"),
(3315, 1109, "36", "Tokushima"),
(3316, 1109, "13", "Tokyo"),
(3317, 1109, "31", "Tottori"),
(3318, 1109, "16", "Toyama"),
(3319, 1109, "30", "Wakayama"),
(3320, 1109, "06", "Yamagata"),
(3321, 1109, "35", "Yamaguchi"),
(3322, 1109, "19", "Yamanashi"),
(3323, 1108, "13", "Clarendon"),
(3324, 1108, "09", "Hanover"),
(3325, 1108, "01", "Kingston"),
(3326, 1108, "04", "Portland"),
(3327, 1108, "02", "Saint Andrew"),
(3328, 1108, "06", "Saint Ann"),
(3329, 1108, "14", "Saint Catherine"),
(3330, 1108, "11", "Saint Elizabeth"),
(3331, 1108, "08", "Saint James"),
(3332, 1108, "05", "Saint Mary"),
(3333, 1108, "03", "Saint Thomea"),
(3334, 1108, "07", "Trelawny"),
(3335, 1108, "10", "Westmoreland"),
(3336, 1110, "AJ", "Ajln"),
(3337, 1110, "AQ", "Al \'Aqaba"),
(3338, 1110, "BA", "Al Balqa\'"),
(3339, 1110, "KA", "Al Karak"),
(3340, 1110, "MA", "Al Mafraq"),
(3341, 1110, "AM", "Amman"),
(3342, 1110, "AT", "At Tafilah"),
(3343, 1110, "AZ", "Az Zarga"),
(3344, 1110, "JR", "Irbid"),
(3345, 1110, "JA", "Jarash"),
(3346, 1110, "MN", "Ma\'an"),
(3347, 1110, "MD", "Madaba"),
(3348, 1112, "110", "Nairobi Municipality"),
(3349, 1112, "300", "Coast"),
(3350, 1112, "500", "North-Eastern Kaskazini Mashariki"),
(3351, 1112, "700", "Rift Valley"),
(3352, 1112, "900", "Western Magharibi"),
(3353, 1117, "GB", "Bishkek"),
(3354, 1117, "B", "Batken"),
(3355, 1117, "C", "Chu"),
(3356, 1117, "J", "Jalal-Abad"),
(3357, 1117, "N", "Naryn"),
(3358, 1117, "O", "Osh"),
(3359, 1117, "T", "Talas"),
(3360, 1117, "Y", "Ysyk-Kol"),
(3361, 1037, "23", "Krong Kaeb"),
(3362, 1037, "24", "Krong Pailin"),
(3363, 1037, "18", "Xrong Preah Sihanouk"),
(3364, 1037, "12", "Phnom Penh"),
(3365, 1037, "2", "Baat Dambang"),
(3366, 1037, "1", "Banteay Mean Chey"),
(3367, 1037, "3", "Rampong Chaam"),
(3368, 1037, "4", "Kampong Chhnang"),
(3369, 1037, "5", "Kampong Spueu"),
(3370, 1037, "6", "Kampong Thum"),
(3371, 1037, "7", "Kampot"),
(3372, 1037, "8", "Kandaal"),
(3373, 1037, "9", "Kach Kong"),
(3374, 1037, "10", "Krachoh"),
(3375, 1037, "11", "Mondol Kiri"),
(3376, 1037, "22", "Otdar Mean Chey"),
(3377, 1037, "15", "Pousaat"),
(3378, 1037, "13", "Preah Vihear"),
(3379, 1037, "14", "Prey Veaeng"),
(3380, 1037, "16", "Rotanak Kiri"),
(3381, 1037, "17", "Siem Reab"),
(3382, 1037, "19", "Stueng Traeng"),
(3383, 1037, "20", "Svaay Rieng"),
(3384, 1037, "21", "Taakaev"),
(3385, 1113, "G", "Gilbert Islands"),
(3386, 1113, "L", "Line Islands"),
(3387, 1113, "P", "Phoenix Islands"),
(3388, 1049, "A", "Anjouan Ndzouani"),
(3389, 1049, "G", "Grande Comore Ngazidja"),
(3390, 1049, "M", "Moheli Moili"),
(3391, 1114, "KAE", "Kaesong-si"),
(3392, 1114, "NAM", "Nampo-si"),
(3393, 1114, "PYO", "Pyongyang-ai"),
(3394, 1114, "CHA", "Chagang-do"),
(3395, 1114, "HAB", "Hamgyongbuk-do"),
(3396, 1114, "HAN", "Hamgyongnam-do"),
(3397, 1114, "HWB", "Hwanghaebuk-do"),
(3398, 1114, "HWN", "Hwanghaenam-do"),
(3399, 1114, "KAN", "Kangwon-do"),
(3400, 1114, "PYB", "Pyonganbuk-do"),
(3401, 1114, "PYN", "Pyongannam-do"),
(3402, 1114, "YAN", "Yanggang-do"),
(3403, 1114, "NAJ", "Najin Sonbong-si"),
(3404, 1115, "11", "Seoul Teugbyeolsi"),
(3405, 1115, "26", "Busan Gwang\'yeogsi"),
(3406, 1115, "27", "Daegu Gwang\'yeogsi"),
(3407, 1115, "30", "Daejeon Gwang\'yeogsi"),
(3408, 1115, "29", "Gwangju Gwang\'yeogsi"),
(3409, 1115, "28", "Incheon Gwang\'yeogsi"),
(3410, 1115, "31", "Ulsan Gwang\'yeogsi"),
(3411, 1115, "43", "Chungcheongbugdo"),
(3412, 1115, "44", "Chungcheongnamdo"),
(3413, 1115, "42", "Gang\'weondo"),
(3414, 1115, "41", "Gyeonggido"),
(3415, 1115, "47", "Gyeongsangbugdo"),
(3416, 1115, "48", "Gyeongsangnamdo"),
(3417, 1115, "49", "Jejudo"),
(3418, 1115, "45", "Jeonrabugdo"),
(3419, 1115, "46", "Jeonranamdo"),
(3420, 1116, "AH", "Al Ahmadi"),
(3421, 1116, "FA", "Al Farwanlyah"),
(3422, 1116, "JA", "Al Jahrah"),
(3423, 1116, "KU", "Al Kuwayt"),
(3424, 1116, "HA", "Hawalli"),
(3425, 1111, "ALA", "Almaty"),
(3426, 1111, "AST", "Astana"),
(3427, 1111, "ALM", "Almaty oblysy"),
(3428, 1111, "AKM", "Aqmola oblysy"),
(3429, 1111, "AKT", "Aqtobe oblysy"),
(3430, 1111, "ATY", "Atyrau oblyfiy"),
(3431, 1111, "ZAP", "Batys Quzaqstan oblysy"),
(3432, 1111, "MAN", "Mangghystau oblysy"),
(3433, 1111, "YUZ", "Ongtustik Quzaqstan oblysy"),
(3434, 1111, "PAV", "Pavlodar oblysy"),
(3435, 1111, "KAR", "Qaraghandy oblysy"),
(3436, 1111, "KUS", "Qostanay oblysy"),
(3437, 1111, "KZY", "Qyzylorda oblysy"),
(3438, 1111, "VOS", "Shyghys Quzaqstan oblysy"),
(3439, 1111, "SEV", "Soltustik Quzaqstan oblysy"),
(3440, 1111, "ZHA", "Zhambyl oblysy Zhambylskaya oblast\'"),
(3441, 1118, "VT", "Vientiane"),
(3442, 1118, "AT", "Attapu"),
(3443, 1118, "BK", "Bokeo"),
(3444, 1118, "BL", "Bolikhamxai"),
(3445, 1118, "CH", "Champasak"),
(3446, 1118, "HO", "Houaphan"),
(3447, 1118, "KH", "Khammouan"),
(3448, 1118, "LM", "Louang Namtha"),
(3449, 1118, "LP", "Louangphabang"),
(3450, 1118, "OU", "Oudomxai"),
(3451, 1118, "PH", "Phongsali"),
(3452, 1118, "SL", "Salavan"),
(3453, 1118, "SV", "Savannakhet"),
(3454, 1118, "XA", "Xaignabouli"),
(3455, 1118, "XN", "Xiasomboun"),
(3456, 1118, "XE", "Xekong"),
(3457, 1118, "XI", "Xiangkhoang"),
(3458, 1120, "BA", "Beirout"),
(3459, 1120, "BI", "El Begsa"),
(3460, 1120, "JL", "Jabal Loubnane"),
(3461, 1120, "AS", "Loubnane ech Chemali"),
(3462, 1120, "JA", "Loubnane ej Jnoubi"),
(3463, 1120, "NA", "Nabatiye"),
(3464, 1199, "52", "Ampara"),
(3465, 1199, "71", "Anuradhapura"),
(3466, 1199, "81", "Badulla"),
(3467, 1199, "51", "Batticaloa"),
(3468, 1199, "11", "Colombo"),
(3469, 1199, "31", "Galle"),
(3470, 1199, "12", "Gampaha"),
(3471, 1199, "33", "Hambantota"),
(3472, 1199, "41", "Jaffna"),
(3473, 1199, "13", "Kalutara"),
(3474, 1199, "21", "Kandy"),
(3475, 1199, "92", "Kegalla"),
(3476, 1199, "42", "Kilinochchi"),
(3477, 1199, "61", "Kurunegala"),
(3478, 1199, "43", "Mannar"),
(3479, 1199, "22", "Matale"),
(3480, 1199, "32", "Matara"),
(3481, 1199, "82", "Monaragala"),
(3482, 1199, "45", "Mullaittivu"),
(3483, 1199, "23", "Nuwara Eliya"),
(3484, 1199, "72", "Polonnaruwa"),
(3485, 1199, "62", "Puttalum"),
(3486, 1199, "91", "Ratnapura"),
(3487, 1199, "53", "Trincomalee"),
(3488, 1199, "44", "VavunLya"),
(3489, 1122, "BM", "Bomi"),
(3490, 1122, "BG", "Bong"),
(3491, 1122, "GB", "Grand Basaa"),
(3492, 1122, "CM", "Grand Cape Mount"),
(3493, 1122, "GG", "Grand Gedeh"),
(3494, 1122, "GK", "Grand Kru"),
(3495, 1122, "LO", "Lofa"),
(3496, 1122, "MG", "Margibi"),
(3497, 1122, "MY", "Maryland"),
(3498, 1122, "MO", "Montserrado"),
(3499, 1122, "NI", "Nimba"),
(3500, 1122, "RI", "Rivercess"),
(3501, 1122, "SI", "Sinoe"),
(3502, 1121, "D", "Berea"),
(3503, 1121, "B", "Butha-Buthe"),
(3504, 1121, "C", "Leribe"),
(3505, 1121, "E", "Mafeteng"),
(3506, 1121, "A", "Maseru"),
(3507, 1121, "F", "Mohale\'s Hoek"),
(3508, 1121, "J", "Mokhotlong"),
(3509, 1121, "H", "Qacha\'s Nek"),
(3510, 1121, "G", "Quthing"),
(3511, 1121, "K", "Thaba-Tseka"),
(3512, 1125, "AL", "Alytaus Apskritis"),
(3513, 1125, "KU", "Kauno Apskritis"),
(3514, 1125, "KL", "Klaipedos Apskritis"),
(3515, 1125, "MR", "Marijampoles Apskritis"),
(3516, 1125, "PN", "Panevezio Apskritis"),
(3517, 1125, "SA", "Sisuliu Apskritis"),
(3518, 1125, "TA", "Taurages Apskritis"),
(3519, 1125, "TE", "Telsiu Apskritis"),
(3520, 1125, "UT", "Utenos Apskritis"),
(3521, 1125, "VL", "Vilniaus Apskritis"),
(3522, 1126, "D", "Diekirch"),
(3523, 1126, "G", "GreveNmacher"),
(3524, 1119, "AI", "Aizkraukles Apripkis"),
(3525, 1119, "AL", "Alkanes Apripkis"),
(3526, 1119, "BL", "Balvu Apripkis"),
(3527, 1119, "BU", "Bauskas Apripkis"),
(3528, 1119, "CE", "Cesu Aprikis"),
(3529, 1119, "DA", "Daugavpile Apripkis"),
(3530, 1119, "DO", "Dobeles Apripkis"),
(3531, 1119, "GU", "Gulbenes Aprlpkis"),
(3532, 1119, "JL", "Jelgavas Apripkis"),
(3533, 1119, "JK", "Jekabpils Apripkis"),
(3534, 1119, "KR", "Kraslavas Apripkis"),
(3535, 1119, "KU", "Kuldlgas Apripkis"),
(3536, 1119, "LM", "Limbazu Apripkis"),
(3537, 1119, "LE", "Liepajas Apripkis"),
(3538, 1119, "LU", "Ludzas Apripkis"),
(3539, 1119, "MA", "Madonas Apripkis"),
(3540, 1119, "OG", "Ogres Apripkis"),
(3541, 1119, "PR", "Preilu Apripkis"),
(3542, 1119, "RE", "Rezaknes Apripkis"),
(3543, 1119, "RI", "Rigas Apripkis"),
(3544, 1119, "SA", "Saldus Apripkis"),
(3545, 1119, "TA", "Talsu Apripkis"),
(3546, 1119, "TU", "Tukuma Apriplcis"),
(3547, 1119, "VK", "Valkas Apripkis"),
(3548, 1119, "VM", "Valmieras Apripkis"),
(3549, 1119, "VE", "Ventspils Apripkis"),
(3550, 1119, "DGV", "Daugavpils"),
(3551, 1119, "JEL", "Jelgava"),
(3552, 1119, "JUR", "Jurmala"),
(3553, 1119, "LPX", "Liepaja"),
(3554, 1119, "REZ", "Rezekne"),
(3555, 1119, "RIX", "Riga"),
(3556, 1119, "VEN", "Ventspils"),
(3557, 1123, "AJ", "Ajdābiyā"),
(3558, 1123, "BU", "Al Buţnān"),
(3559, 1123, "HZ", "Al Hizām al Akhdar"),
(3560, 1123, "JA", "Al Jabal al Akhdar"),
(3561, 1123, "JI", "Al Jifārah"),
(3562, 1123, "JU", "Al Jufrah"),
(3563, 1123, "KF", "Al Kufrah"),
(3564, 1123, "MJ", "Al Marj"),
(3565, 1123, "MB", "Al Marqab"),
(3566, 1123, "QT", "Al Qaţrūn"),
(3567, 1123, "QB", "Al Qubbah"),
(3568, 1123, "WA", "Al Wāhah"),
(3569, 1123, "NQ", "An Nuqaţ al Khams"),
(3570, 1123, "SH", "Ash Shāţi\'"),
(3571, 1123, "ZA", "Az Zāwiyah"),
(3572, 1123, "BA", "Banghāzī"),
(3573, 1123, "BW", "Banī Walīd"),
(3574, 1123, "DR", "Darnah"),
(3575, 1123, "GD", "Ghadāmis"),
(3576, 1123, "GR", "Gharyān"),
(3577, 1123, "GT", "Ghāt"),
(3578, 1123, "JB", "Jaghbūb"),
(3579, 1123, "MI", "Mişrātah"),
(3580, 1123, "MZ", "Mizdah"),
(3581, 1123, "MQ", "Murzuq"),
(3582, 1123, "NL", "Nālūt"),
(3583, 1123, "SB", "Sabhā"),
(3584, 1123, "SS", "Şabrātah Şurmān"),
(3585, 1123, "SR", "Surt"),
(3586, 1123, "TN", "Tājūrā\' wa an Nawāhī al Arbāh"),
(3587, 1123, "TB", "Ţarābulus"),
(3588, 1123, "TM", "Tarhūnah-Masallātah"),
(3589, 1123, "WD", "Wādī al hayāt"),
(3590, 1123, "YJ", "Yafran-Jādū"),
(3591, 1146, "AGD", "Agadir"),
(3592, 1146, "BAH", "Aït Baha"),
(3593, 1146, "MEL", "Aït Melloul"),
(3594, 1146, "HAO", "Al Haouz"),
(3595, 1146, "HOC", "Al Hoceïma"),
(3596, 1146, "ASZ", "Assa-Zag"),
(3597, 1146, "AZI", "Azilal"),
(3598, 1146, "BEM", "Beni Mellal"),
(3599, 1146, "BES", "Ben Sllmane"),
(3600, 1146, "BER", "Berkane"),
(3601, 1146, "BOD", "Boujdour"),
(3602, 1146, "BOM", "Boulemane"),
(3603, 1146, "CAS", "Casablanca [Dar el Beïda]"),
(3604, 1146, "CHE", "Chefchaouene"),
(3605, 1146, "CHI", "Chichaoua"),
(3606, 1146, "HAJ", "El Hajeb"),
(3607, 1146, "JDI", "El Jadida"),
(3608, 1146, "ERR", "Errachidia"),
(3609, 1146, "ESI", "Essaouira"),
(3610, 1146, "ESM", "Es Smara"),
(3611, 1146, "FES", "Fès"),
(3612, 1146, "FIG", "Figuig"),
(3613, 1146, "GUE", "Guelmim"),
(3614, 1146, "IFR", "Ifrane"),
(3615, 1146, "JRA", "Jerada"),
(3616, 1146, "KES", "Kelaat Sraghna"),
(3617, 1146, "KEN", "Kénitra"),
(3618, 1146, "KHE", "Khemisaet"),
(3619, 1146, "KHN", "Khenifra"),
(3620, 1146, "KHO", "Khouribga"),
(3621, 1146, "LAA", "Laâyoune (EH)"),
(3622, 1146, "LAP", "Larache"),
(3623, 1146, "MAR", "Marrakech"),
(3624, 1146, "MEK", "Meknsès"),
(3625, 1146, "NAD", "Nador"),
(3626, 1146, "OUA", "Ouarzazate"),
(3627, 1146, "OUD", "Oued ed Dahab (EH)"),
(3628, 1146, "OUJ", "Oujda"),
(3629, 1146, "RBA", "Rabat-Salé"),
(3630, 1146, "SAF", "Safi"),
(3631, 1146, "SEF", "Sefrou"),
(3632, 1146, "SET", "Settat"),
(3633, 1146, "SIK", "Sidl Kacem"),
(3634, 1146, "TNG", "Tanger"),
(3635, 1146, "TNT", "Tan-Tan"),
(3636, 1146, "TAO", "Taounate"),
(3637, 1146, "TAR", "Taroudannt"),
(3638, 1146, "TAT", "Tata"),
(3639, 1146, "TAZ", "Taza"),
(3640, 1146, "TET", "Tétouan"),
(3641, 1146, "TIZ", "Tiznit"),
(3642, 1142, "GA", "Gagauzia, Unitate Teritoriala Autonoma"),
(3643, 1142, "CU", "Chisinau"),
(3644, 1142, "SN", "Stinga Nistrului, unitatea teritoriala din"),
(3645, 1142, "BA", "Balti"),
(3646, 1142, "CA", "Cahul"),
(3647, 1142, "ED", "Edinet"),
(3648, 1142, "LA", "Lapusna"),
(3649, 1142, "OR", "Orhei"),
(3650, 1142, "SO", "Soroca"),
(3651, 1142, "TA", "Taraclia"),
(3652, 1142, "TI", "Tighina [Bender]"),
(3653, 1142, "UN", "Ungheni"),
(3654, 1129, "T", "Antananarivo"),
(3655, 1129, "D", "Antsiranana"),
(3656, 1129, "F", "Fianarantsoa"),
(3657, 1129, "M", "Mahajanga"),
(3658, 1129, "A", "Toamasina"),
(3659, 1129, "U", "Toliara"),
(3660, 1135, "ALL", "Ailinglapalap"),
(3661, 1135, "ALK", "Ailuk"),
(3662, 1135, "ARN", "Arno"),
(3663, 1135, "AUR", "Aur"),
(3664, 1135, "EBO", "Ebon"),
(3665, 1135, "ENI", "Eniwetok"),
(3666, 1135, "JAL", "Jaluit"),
(3667, 1135, "KIL", "Kili"),
(3668, 1135, "KWA", "Kwajalein"),
(3669, 1135, "LAE", "Lae"),
(3670, 1135, "LIB", "Lib"),
(3671, 1135, "LIK", "Likiep"),
(3672, 1135, "MAJ", "Majuro"),
(3673, 1135, "MAL", "Maloelap"),
(3674, 1135, "MEJ", "Mejit"),
(3675, 1135, "MIL", "Mili"),
(3676, 1135, "NMK", "Namorik"),
(3677, 1135, "NMU", "Namu"),
(3678, 1135, "RON", "Rongelap"),
(3679, 1135, "UJA", "Ujae"),
(3680, 1135, "UJL", "Ujelang"),
(3681, 1135, "UTI", "Utirik"),
(3682, 1135, "WTN", "Wotho"),
(3683, 1135, "WTJ", "Wotje"),
(3684, 1133, "BK0", "Bamako"),
(3685, 1133, "7", "Gao"),
(3686, 1133, "1", "Kayes"),
(3687, 1133, "8", "Kidal"),
(3688, 1133, "2", "Xoulikoro"),
(3689, 1133, "5", "Mopti"),
(3690, 1133, "4", "S69ou"),
(3691, 1133, "3", "Sikasso"),
(3692, 1133, "6", "Tombouctou"),
(3693, 1035, "07", "Ayeyarwady"),
(3694, 1035, "02", "Bago"),
(3695, 1035, "03", "Magway"),
(3696, 1035, "04", "Mandalay"),
(3697, 1035, "01", "Sagaing"),
(3698, 1035, "05", "Tanintharyi"),
(3699, 1035, "06", "Yangon"),
(3700, 1035, "14", "Chin"),
(3701, 1035, "11", "Kachin"),
(3702, 1035, "12", "Kayah"),
(3703, 1035, "13", "Kayin"),
(3704, 1035, "15", "Mon"),
(3705, 1035, "16", "Rakhine"),
(3706, 1035, "17", "Shan"),
(3707, 1144, "1", "Ulanbaatar"),
(3708, 1144, "073", "Arhangay"),
(3709, 1144, "069", "Bayanhongor"),
(3710, 1144, "071", "Bayan-Olgiy"),
(3711, 1144, "067", "Bulgan"),
(3712, 1144, "037", "Darhan uul"),
(3713, 1144, "061", "Dornod"),
(3714, 1144, "063", "Dornogov,"),
(3715, 1144, "059", "DundgovL"),
(3716, 1144, "057", "Dzavhan"),
(3717, 1144, "065", "Govi-Altay"),
(3718, 1144, "064", "Govi-Smber"),
(3719, 1144, "039", "Hentiy"),
(3720, 1144, "043", "Hovd"),
(3721, 1144, "041", "Hovsgol"),
(3722, 1144, "053", "Omnogovi"),
(3723, 1144, "035", "Orhon"),
(3724, 1144, "055", "Ovorhangay"),
(3725, 1144, "049", "Selenge"),
(3726, 1144, "051", "Shbaatar"),
(3727, 1144, "047", "Tov"),
(3728, 1144, "046", "Uvs"),
(3729, 1137, "NKC", "Nouakchott"),
(3730, 1137, "03", "Assaba"),
(3731, 1137, "05", "Brakna"),
(3732, 1137, "08", "Dakhlet Nouadhibou"),
(3733, 1137, "04", "Gorgol"),
(3734, 1137, "10", "Guidimaka"),
(3735, 1137, "01", "Hodh ech Chargui"),
(3736, 1137, "02", "Hodh el Charbi"),
(3737, 1137, "12", "Inchiri"),
(3738, 1137, "09", "Tagant"),
(3739, 1137, "11", "Tiris Zemmour"),
(3740, 1137, "06", "Trarza"),
(3741, 1138, "BR", "Beau Bassin-Rose Hill"),
(3742, 1138, "CU", "Curepipe"),
(3743, 1138, "PU", "Port Louis"),
(3744, 1138, "QB", "Quatre Bornes"),
(3745, 1138, "VP", "Vacosa-Phoenix"),
(3746, 1138, "BL", "Black River"),
(3747, 1138, "FL", "Flacq"),
(3748, 1138, "GP", "Grand Port"),
(3749, 1138, "MO", "Moka"),
(3750, 1138, "PA", "Pamplemousses"),
(3751, 1138, "PW", "Plaines Wilhems"),
(3752, 1138, "RP", "Riviere du Rempart"),
(3753, 1138, "SA", "Savanne"),
(3754, 1138, "AG", "Agalega Islands"),
(3755, 1138, "CC", "Cargados Carajos Shoals"),
(3756, 1138, "RO", "Rodrigues Island"),
(3757, 1132, "MLE", "Male"),
(3758, 1132, "02", "Alif"),
(3759, 1132, "20", "Baa"),
(3760, 1132, "17", "Dhaalu"),
(3761, 1132, "14", "Faafu"),
(3762, 1132, "27", "Gaaf Alif"),
(3763, 1132, "28", "Gaefu Dhaalu"),
(3764, 1132, "29", "Gnaviyani"),
(3765, 1132, "07", "Haa Alif"),
(3766, 1132, "23", "Haa Dhaalu"),
(3767, 1132, "26", "Kaafu"),
(3768, 1132, "05", "Laamu"),
(3769, 1132, "03", "Lhaviyani"),
(3770, 1132, "12", "Meemu"),
(3771, 1132, "25", "Noonu"),
(3772, 1132, "13", "Raa"),
(3773, 1132, "01", "Seenu"),
(3774, 1132, "24", "Shaviyani"),
(3775, 1132, "08", "Thaa"),
(3776, 1132, "04", "Vaavu"),
(3777, 1130, "BA", "Balaka"),
(3778, 1130, "BL", "Blantyre"),
(3779, 1130, "CK", "Chikwawa"),
(3780, 1130, "CR", "Chiradzulu"),
(3781, 1130, "CT", "Chitipa"),
(3782, 1130, "DE", "Dedza"),
(3783, 1130, "DO", "Dowa"),
(3784, 1130, "KR", "Karonga"),
(3785, 1130, "KS", "Kasungu"),
(3786, 1130, "LK", "Likoma Island"),
(3787, 1130, "LI", "Lilongwe"),
(3788, 1130, "MH", "Machinga"),
(3789, 1130, "MG", "Mangochi"),
(3790, 1130, "MC", "Mchinji"),
(3791, 1130, "MU", "Mulanje"),
(3792, 1130, "MW", "Mwanza"),
(3793, 1130, "MZ", "Mzimba"),
(3794, 1130, "NB", "Nkhata Bay"),
(3795, 1130, "NK", "Nkhotakota"),
(3796, 1130, "NS", "Nsanje"),
(3797, 1130, "NU", "Ntcheu"),
(3798, 1130, "NI", "Ntchisi"),
(3799, 1130, "PH", "Phalomba"),
(3800, 1130, "RU", "Rumphi"),
(3801, 1130, "SA", "Salima"),
(3802, 1130, "TH", "Thyolo"),
(3803, 1130, "ZO", "Zomba"),
(3804, 1140, "AGU", "Aguascalientes"),
(3805, 1140, "BCN", "Baja California"),
(3806, 1140, "BCS", "Baja California Sur"),
(3807, 1140, "CAM", "Campeche"),
(3808, 1140, "COA", "Coahu ila"),
(3809, 1140, "COL", "Col ima"),
(3810, 1140, "CHP", "Chiapas"),
(3811, 1140, "CHH", "Chihushua"),
(3812, 1140, "DUR", "Durango"),
(3813, 1140, "GUA", "Guanajuato"),
(3814, 1140, "GRO", "Guerrero"),
(3815, 1140, "HID", "Hidalgo"),
(3816, 1140, "JAL", "Jalisco"),
(3817, 1140, "MEX", "Mexico"),
(3818, 1140, "MIC", "Michoacin"),
(3819, 1140, "MOR", "Moreloa"),
(3820, 1140, "NAY", "Nayarit"),
(3821, 1140, "NLE", "Nuevo Leon"),
(3822, 1140, "OAX", "Oaxaca"),
(3823, 1140, "PUE", "Puebla"),
(3824, 1140, "QUE", "Queretaro"),
(3825, 1140, "ROO", "Quintana Roo"),
(3826, 1140, "SLP", "San Luis Potosi"),
(3827, 1140, "SIN", "Sinaloa"),
(3828, 1140, "SON", "Sonora"),
(3829, 1140, "TAB", "Tabasco"),
(3830, 1140, "TAM", "Tamaulipas"),
(3831, 1140, "TLA", "Tlaxcala"),
(3832, 1140, "VER", "Veracruz"),
(3833, 1140, "YUC", "Yucatan"),
(3834, 1140, "ZAC", "Zacatecas"),
(3835, 1131, "14", "Wilayah Persekutuan Kuala Lumpur"),
(3836, 1131, "15", "Wilayah Persekutuan Labuan"),
(3837, 1131, "16", "Wilayah Persekutuan Putrajaya"),
(3838, 1131, "01", "Johor"),
(3839, 1131, "02", "Kedah"),
(3840, 1131, "03", "Kelantan"),
(3841, 1131, "04", "Melaka"),
(3842, 1131, "05", "Negeri Sembilan"),
(3843, 1131, "06", "Pahang"),
(3844, 1131, "08", "Perak"),
(3845, 1131, "09", "Perlis"),
(3846, 1131, "07", "Pulau Pinang"),
(3847, 1131, "12", "Sabah"),
(3848, 1131, "13", "Sarawak"),
(3849, 1131, "10", "Selangor"),
(3850, 1131, "11", "Terengganu"),
(3851, 1147, "MPM", "Maputo"),
(3852, 1147, "P", "Cabo Delgado"),
(3853, 1147, "G", "Gaza"),
(3854, 1147, "I", "Inhambane"),
(3855, 1147, "B", "Manica"),
(3856, 1147, "N", "Numpula"),
(3857, 1147, "A", "Niaaea"),
(3858, 1147, "S", "Sofala"),
(3859, 1147, "T", "Tete"),
(3860, 1147, "Q", "Zambezia"),
(3861, 1148, "CA", "Caprivi"),
(3862, 1148, "ER", "Erongo"),
(3863, 1148, "HA", "Hardap"),
(3864, 1148, "KA", "Karas"),
(3865, 1148, "KH", "Khomae"),
(3866, 1148, "KU", "Kunene"),
(3867, 1148, "OW", "Ohangwena"),
(3868, 1148, "OK", "Okavango"),
(3869, 1148, "OH", "Omaheke"),
(3870, 1148, "OS", "Omusati"),
(3871, 1148, "ON", "Oshana"),
(3872, 1148, "OT", "Oshikoto"),
(3873, 1148, "OD", "Otjozondjupa"),
(3874, 1156, "8", "Niamey"),
(3875, 1156, "1", "Agadez"),
(3876, 1156, "2", "Diffa"),
(3877, 1156, "3", "Dosso"),
(3878, 1156, "4", "Maradi"),
(3879, 1156, "S", "Tahoua"),
(3880, 1156, "6", "Tillaberi"),
(3881, 1156, "7", "Zinder"),
(3882, 1157, "FC", "Abuja Capital Territory"),
(3883, 1157, "AB", "Abia"),
(3884, 1157, "AD", "Adamawa"),
(3885, 1157, "AK", "Akwa Ibom"),
(3886, 1157, "AN", "Anambra"),
(3887, 1157, "BA", "Bauchi"),
(3888, 1157, "BY", "Bayelsa"),
(3889, 1157, "BE", "Benue"),
(3890, 1157, "BO", "Borno"),
(3891, 1157, "CR", "Cross River"),
(3892, 1157, "DE", "Delta"),
(3893, 1157, "EB", "Ebonyi"),
(3894, 1157, "ED", "Edo"),
(3895, 1157, "EK", "Ekiti"),
(3896, 1157, "EN", "Enugu"),
(3897, 1157, "GO", "Gombe"),
(3898, 1157, "IM", "Imo"),
(3899, 1157, "JI", "Jigawa"),
(3900, 1157, "KD", "Kaduna"),
(3901, 1157, "KN", "Kano"),
(3902, 1157, "KT", "Katsina"),
(3903, 1157, "KE", "Kebbi"),
(3904, 1157, "KO", "Kogi"),
(3905, 1157, "KW", "Kwara"),
(3906, 1157, "LA", "Lagos"),
(3907, 1157, "NA", "Nassarawa"),
(3908, 1157, "NI", "Niger"),
(3909, 1157, "OG", "Ogun"),
(3910, 1157, "ON", "Ondo"),
(3911, 1157, "OS", "Osun"),
(3912, 1157, "OY", "Oyo"),
(3913, 1157, "RI", "Rivers"),
(3914, 1157, "SO", "Sokoto"),
(3915, 1157, "TA", "Taraba"),
(3916, 1157, "YO", "Yobe"),
(3917, 1157, "ZA", "Zamfara"),
(3918, 1155, "BO", "Boaco"),
(3919, 1155, "CA", "Carazo"),
(3920, 1155, "CI", "Chinandega"),
(3921, 1155, "CO", "Chontales"),
(3922, 1155, "ES", "Esteli"),
(3923, 1155, "JI", "Jinotega"),
(3924, 1155, "LE", "Leon"),
(3925, 1155, "MD", "Madriz"),
(3926, 1155, "MN", "Managua"),
(3927, 1155, "MS", "Masaya"),
(3928, 1155, "MT", "Matagalpa"),
(3929, 1155, "NS", "Nueva Segovia"),
(3930, 1155, "SJ", "Rio San Juan"),
(3931, 1155, "RI", "Rivas"),
(3932, 1155, "AN", "Atlantico Norte"),
(3933, 1155, "AS", "Atlantico Sur"),
(3934, 1152, "DR", "Drente"),
(3935, 1152, "FL", "Flevoland"),
(3936, 1152, "FR", "Friesland"),
(3937, 1152, "GL", "Gelderland"),
(3938, 1152, "GR", "Groningen"),
(3939, 1152, "NB", "Noord-Brabant"),
(3940, 1152, "NH", "Noord-Holland"),
(3941, 1152, "OV", "Overijssel"),
(3942, 1152, "UT", "Utrecht"),
(3943, 1152, "ZH", "Zuid-Holland"),
(3944, 1152, "ZL", "Zeeland"),
(3945, 1161, "02", "Akershus"),
(3946, 1161, "09", "Aust-Agder"),
(3947, 1161, "06", "Buskerud"),
(3948, 1161, "20", "Finumark"),
(3949, 1161, "04", "Hedmark"),
(3950, 1161, "12", "Hordaland"),
(3951, 1161, "15", "Mire og Romsdal"),
(3952, 1161, "18", "Nordland"),
(3953, 1161, "17", "Nord-Trindelag"),
(3954, 1161, "05", "Oppland"),
(3955, 1161, "03", "Oslo"),
(3956, 1161, "11", "Rogaland"),
(3957, 1161, "14", "Sogn og Fjordane"),
(3958, 1161, "16", "Sir-Trindelag"),
(3959, 1161, "06", "Telemark"),
(3960, 1161, "19", "Troms"),
(3961, 1161, "10", "Vest-Agder"),
(3962, 1161, "07", "Vestfold"),
(3963, 1161, "01", "Ostfold"),
(3964, 1161, "22", "Jan Mayen"),
(3965, 1161, "21", "Svalbard"),
(3966, 1154, "AUK", "Auckland"),
(3967, 1154, "BOP", "Bay of Plenty"),
(3968, 1154, "CAN", "Canterbury"),
(3969, 1154, "GIS", "Gisborne"),
(3970, 1154, "HKB", "Hawkes\'s Bay"),
(3971, 1154, "MWT", "Manawatu-Wanganui"),
(3972, 1154, "MBH", "Marlborough"),
(3973, 1154, "NSN", "Nelson"),
(3974, 1154, "NTL", "Northland"),
(3975, 1154, "OTA", "Otago"),
(3976, 1154, "STL", "Southland"),
(3977, 1154, "TKI", "Taranaki"),
(3978, 1154, "TAS", "Tasman"),
(3979, 1154, "WKO", "waikato"),
(3980, 1154, "WGN", "Wellington"),
(3981, 1154, "WTC", "West Coast"),
(3982, 1162, "DA", "Ad Dakhillyah"),
(3983, 1162, "BA", "Al Batinah"),
(3984, 1162, "JA", "Al Janblyah"),
(3985, 1162, "WU", "Al Wusta"),
(3986, 1162, "SH", "Ash Sharqlyah"),
(3987, 1162, "ZA", "Az Zahirah"),
(3988, 1162, "MA", "Masqat"),
(3989, 1162, "MU", "Musandam"),
(3990, 1166, "1", "Bocas del Toro"),
(3991, 1166, "2", "Cocle"),
(3992, 1166, "4", "Chiriqui"),
(3993, 1166, "5", "Darien"),
(3994, 1166, "6", "Herrera"),
(3995, 1166, "7", "Loa Santoa"),
(3996, 1166, "8", "Panama"),
(3997, 1166, "9", "Veraguas"),
(3998, 1166, "Q", "Comarca de San Blas"),
(3999, 1169, "CAL", "El Callao"),
(4000, 1169, "ANC", "Ancash"),
(4001, 1169, "APU", "Apurimac"),
(4002, 1169, "ARE", "Arequipa"),
(4003, 1169, "AYA", "Ayacucho"),
(4004, 1169, "CAJ", "Cajamarca"),
(4005, 1169, "CUS", "Cuzco"),
(4006, 1169, "HUV", "Huancavelica"),
(4007, 1169, "HUC", "Huanuco"),
(4008, 1169, "ICA", "Ica"),
(4009, 1169, "JUN", "Junin"),
(4010, 1169, "LAL", "La Libertad"),
(4011, 1169, "LAM", "Lambayeque"),
(4012, 1169, "LIM", "Lima"),
(4013, 1169, "LOR", "Loreto"),
(4014, 1169, "MDD", "Madre de Dios"),
(4015, 1169, "MOQ", "Moquegua"),
(4016, 1169, "PAS", "Pasco"),
(4017, 1169, "PIU", "Piura"),
(4018, 1169, "PUN", "Puno"),
(4019, 1169, "SAM", "San Martin"),
(4020, 1169, "TAC", "Tacna"),
(4021, 1169, "TUM", "Tumbes"),
(4022, 1169, "UCA", "Ucayali"),
(4023, 1167, "NCD", "National Capital District (Port Moresby)"),
(4024, 1167, "CPK", "Chimbu"),
(4025, 1167, "EHG", "Eastern Highlands"),
(4026, 1167, "EBR", "East New Britain"),
(4027, 1167, "ESW", "East Sepik"),
(4028, 1167, "EPW", "Enga"),
(4029, 1167, "GPK", "Gulf"),
(4030, 1167, "MPM", "Madang"),
(4031, 1167, "MRL", "Manus"),
(4032, 1167, "MBA", "Milne Bay"),
(4033, 1167, "MPL", "Morobe"),
(4034, 1167, "NIK", "New Ireland"),
(4035, 1167, "NSA", "North Solomons"),
(4036, 1167, "SAN", "Santaun"),
(4037, 1167, "SHM", "Southern Highlands"),
(4038, 1167, "WHM", "Western Highlands"),
(4039, 1167, "WBK", "West New Britain"),
(4040, 1170, "ABR", "Abra"),
(4041, 1170, "AGN", "Agusan del Norte"),
(4042, 1170, "AGS", "Agusan del Sur"),
(4043, 1170, "AKL", "Aklan"),
(4044, 1170, "ALB", "Albay"),
(4045, 1170, "ANT", "Antique"),
(4046, 1170, "APA", "Apayao"),
(4047, 1170, "AUR", "Aurora"),
(4048, 1170, "BAS", "Basilan"),
(4049, 1170, "BAN", "Batasn"),
(4050, 1170, "BTN", "Batanes"),
(4051, 1170, "BTG", "Batangas"),
(4052, 1170, "BEN", "Benguet"),
(4053, 1170, "BIL", "Biliran"),
(4054, 1170, "BOH", "Bohol"),
(4055, 1170, "BUK", "Bukidnon"),
(4056, 1170, "BUL", "Bulacan"),
(4057, 1170, "CAG", "Cagayan"),
(4058, 1170, "CAN", "Camarines Norte"),
(4059, 1170, "CAS", "Camarines Sur"),
(4060, 1170, "CAM", "Camiguin"),
(4061, 1170, "CAP", "Capiz"),
(4062, 1170, "CAT", "Catanduanes"),
(4063, 1170, "CAV", "Cavite"),
(4064, 1170, "CEB", "Cebu"),
(4065, 1170, "COM", "Compostela Valley"),
(4066, 1170, "DAV", "Davao"),
(4067, 1170, "DAS", "Davao del Sur"),
(4068, 1170, "DAO", "Davao Oriental"),
(4069, 1170, "EAS", "Eastern Samar"),
(4070, 1170, "GUI", "Guimaras"),
(4071, 1170, "IFU", "Ifugao"),
(4072, 1170, "ILN", "Ilocos Norte"),
(4073, 1170, "ILS", "Ilocos Sur"),
(4074, 1170, "ILI", "Iloilo"),
(4075, 1170, "ISA", "Isabela"),
(4076, 1170, "KAL", "Kalinga-Apayso"),
(4077, 1170, "LAG", "Laguna"),
(4078, 1170, "LAN", "Lanao del Norte"),
(4079, 1170, "LAS", "Lanao del Sur"),
(4080, 1170, "LUN", "La Union"),
(4081, 1170, "LEY", "Leyte"),
(4082, 1170, "MAG", "Maguindanao"),
(4083, 1170, "MAD", "Marinduque"),
(4084, 1170, "MAS", "Masbate"),
(4085, 1170, "MDC", "Mindoro Occidental"),
(4086, 1170, "MDR", "Mindoro Oriental"),
(4087, 1170, "MSC", "Misamis Occidental"),
(4088, 1170, "MSR", "Misamis Oriental"),
(4089, 1170, "MOU", "Mountain Province"),
(4090, 1170, "NEC", "Negroe Occidental"),
(4091, 1170, "NER", "Negros Oriental"),
(4092, 1170, "NCO", "North Cotabato"),
(4093, 1170, "NSA", "Northern Samar"),
(4094, 1170, "NUE", "Nueva Ecija"),
(4095, 1170, "NUV", "Nueva Vizcaya"),
(4096, 1170, "PLW", "Palawan"),
(4097, 1170, "PAM", "Pampanga"),
(4098, 1170, "PAN", "Pangasinan"),
(4099, 1170, "QUE", "Quezon"),
(4100, 1170, "QUI", "Quirino"),
(4101, 1170, "RIZ", "Rizal"),
(4102, 1170, "ROM", "Romblon"),
(4103, 1170, "SAR", "Sarangani"),
(4104, 1170, "SIG", "Siquijor"),
(4105, 1170, "SOR", "Sorsogon"),
(4106, 1170, "SCO", "South Cotabato"),
(4107, 1170, "SLE", "Southern Leyte"),
(4108, 1170, "SUK", "Sultan Kudarat"),
(4109, 1170, "SLU", "Sulu"),
(4110, 1170, "SUN", "Surigao del Norte"),
(4111, 1170, "SUR", "Surigao del Sur"),
(4112, 1170, "TAR", "Tarlac"),
(4113, 1170, "TAW", "Tawi-Tawi"),
(4114, 1170, "WSA", "Western Samar"),
(4115, 1170, "ZMB", "Zambales"),
(4116, 1170, "ZAN", "Zamboanga del Norte"),
(4117, 1170, "ZAS", "Zamboanga del Sur"),
(4118, 1170, "ZSI", "Zamboanga Sibiguey"),
(4119, 1163, "IS", "Islamabad"),
(4120, 1163, "BA", "Baluchistan (en)"),
(4121, 1163, "NW", "North-West Frontier"),
(4122, 1163, "SD", "Sind (en)"),
(4123, 1163, "TA", "Federally Administered Tribal Aresa"),
(4124, 1163, "JK", "Azad Rashmir"),
(4125, 1163, "NA", "Northern Areas"),
(4126, 1173, "01", "Aveiro"),
(4127, 1173, "02", "Beja"),
(4128, 1173, "03", "Braga"),
(4129, 1173, "04", "Braganca"),
(4130, 1173, "05", "Castelo Branco"),
(4131, 1173, "06", "Colmbra"),
(4132, 1173, "07", "Ovora"),
(4133, 1173, "08", "Faro"),
(4134, 1173, "09", "Guarda"),
(4135, 1173, "10", "Leiria"),
(4136, 1173, "11", "Lisboa"),
(4137, 1173, "12", "Portalegre"),
(4138, 1173, "13", "Porto"),
(4139, 1173, "14", "Santarem"),
(4140, 1173, "15", "Setubal"),
(4141, 1173, "16", "Viana do Castelo"),
(4142, 1173, "17", "Vila Real"),
(4143, 1173, "18", "Viseu"),
(4144, 1173, "20", "Regiao Autonoma dos Acores"),
(4145, 1173, "30", "Regiao Autonoma da Madeira"),
(4146, 1168, "ASU", "Asuncion"),
(4147, 1168, "16", "Alto Paraguay"),
(4148, 1168, "10", "Alto Parana"),
(4149, 1168, "13", "Amambay"),
(4150, 1168, "19", "Boqueron"),
(4151, 1168, "5", "Caeguazu"),
(4152, 1168, "6", "Caazapl"),
(4153, 1168, "14", "Canindeyu"),
(4154, 1168, "1", "Concepcion"),
(4155, 1168, "3", "Cordillera"),
(4156, 1168, "4", "Guaira"),
(4157, 1168, "7", "Itapua"),
(4158, 1168, "8", "Miaiones"),
(4159, 1168, "12", "Neembucu"),
(4160, 1168, "9", "Paraguari"),
(4161, 1168, "15", "Presidente Hayes"),
(4162, 1168, "2", "San Pedro"),
(4163, 1175, "DA", "Ad Dawhah"),
(4164, 1175, "GH", "Al Ghuwayriyah"),
(4165, 1175, "JU", "Al Jumayliyah"),
(4166, 1175, "KH", "Al Khawr"),
(4167, 1175, "WA", "Al Wakrah"),
(4168, 1175, "RA", "Ar Rayyan"),
(4169, 1175, "JB", "Jariyan al Batnah"),
(4170, 1175, "MS", "Madinat ash Shamal"),
(4171, 1175, "US", "Umm Salal"),
(4172, 1176, "B", "Bucuresti"),
(4173, 1176, "AB", "Alba"),
(4174, 1176, "AR", "Arad"),
(4175, 1176, "AG", "Arges"),
(4176, 1176, "BC", "Bacau"),
(4177, 1176, "BH", "Bihor"),
(4178, 1176, "BN", "Bistrita-Nasaud"),
(4179, 1176, "BT", "Boto\'ani"),
(4180, 1176, "BV", "Bra\'ov"),
(4181, 1176, "BR", "Braila"),
(4182, 1176, "BZ", "Buzau"),
(4183, 1176, "CS", "Caras-Severin"),
(4184, 1176, "CL", "Ca la ras\'i"),
(4185, 1176, "CJ", "Cluj"),
(4186, 1176, "CT", "Constant\'a"),
(4187, 1176, "CV", "Covasna"),
(4188, 1176, "DB", "Dambovit\'a"),
(4189, 1176, "DJ", "Dolj"),
(4190, 1176, "GL", "Galat\'i"),
(4191, 1176, "GR", "Giurgiu"),
(4192, 1176, "GJ", "Gorj"),
(4193, 1176, "HR", "Harghita"),
(4194, 1176, "HD", "Hunedoara"),
(4195, 1176, "IL", "Ialomit\'a"),
(4196, 1176, "IS", "Ias\'i"),
(4197, 1176, "IF", "Ilfov"),
(4198, 1176, "MM", "Maramures"),
(4199, 1176, "MH", "Mehedint\'i"),
(4200, 1176, "MS", "Mures"),
(4201, 1176, "NT", "Neamt"),
(4202, 1176, "OT", "Olt"),
(4203, 1176, "PH", "Prahova"),
(4204, 1176, "SM", "Satu Mare"),
(4205, 1176, "SJ", "Sa laj"),
(4206, 1176, "SB", "Sibiu"),
(4207, 1176, "SV", "Suceava"),
(4208, 1176, "TR", "Teleorman"),
(4209, 1176, "TM", "Timis"),
(4210, 1176, "TL", "Tulcea"),
(4211, 1176, "VS", "Vaslui"),
(4212, 1176, "VL", "Valcea"),
(4213, 1176, "VN", "Vrancea"),
(4214, 1177, "AD", "Adygeya, Respublika"),
(4215, 1177, "AL", "Altay, Respublika"),
(4216, 1177, "BA", "Bashkortostan, Respublika"),
(4217, 1177, "BU", "Buryatiya, Respublika"),
(4218, 1177, "CE", "Chechenskaya Respublika"),
(4219, 1177, "CU", "Chuvashskaya Respublika"),
(4220, 1177, "DA", "Dagestan, Respublika"),
(4221, 1177, "IN", "Ingushskaya Respublika"),
(4222, 1177, "KB", "Kabardino-Balkarskaya"),
(4223, 1177, "KL", "Kalmykiya, Respublika"),
(4224, 1177, "KC", "Karachayevo-Cherkesskaya Respublika"),
(4225, 1177, "KR", "Kareliya, Respublika"),
(4226, 1177, "KK", "Khakasiya, Respublika"),
(4227, 1177, "KO", "Komi, Respublika"),
(4228, 1177, "ME", "Mariy El, Respublika"),
(4229, 1177, "MO", "Mordoviya, Respublika"),
(4230, 1177, "SA", "Sakha, Respublika [Yakutiya]"),
(4231, 1177, "SE", "Severnaya Osetiya, Respublika"),
(4232, 1177, "TA", "Tatarstan, Respublika"),
(4233, 1177, "TY", "Tyva, Respublika [Tuva]"),
(4234, 1177, "UD", "Udmurtskaya Respublika"),
(4235, 1177, "ALT", "Altayskiy kray"),
(4236, 1177, "KHA", "Khabarovskiy kray"),
(4237, 1177, "KDA", "Krasnodarskiy kray"),
(4238, 1177, "KYA", "Krasnoyarskiy kray"),
(4239, 1177, "PRI", "Primorskiy kray"),
(4240, 1177, "STA", "Stavropol\'skiy kray"),
(4241, 1177, "AMU", "Amurskaya oblast\'"),
(4242, 1177, "ARK", "Arkhangel\'skaya oblast\'"),
(4243, 1177, "AST", "Astrakhanskaya oblast\'"),
(4244, 1177, "BEL", "Belgorodskaya oblast\'"),
(4245, 1177, "BRY", "Bryanskaya oblast\'"),
(4246, 1177, "CHE", "Chelyabinskaya oblast\'"),
(4247, 1177, "CHI", "Chitinskaya oblast\'"),
(4248, 1177, "IRK", "Irkutskaya oblast\'"),
(4249, 1177, "IVA", "Ivanovskaya oblast\'"),
(4250, 1177, "KGD", "Kaliningradskaya oblast\'"),
(4251, 1177, "KLU", "Kaluzhskaya oblast\'"),
(4252, 1177, "KAM", "Kamchatskaya oblast\'"),
(4253, 1177, "KEM", "Kemerovskaya oblast\'"),
(4254, 1177, "KIR", "Kirovskaya oblast\'"),
(4255, 1177, "KOS", "Kostromskaya oblast\'"),
(4256, 1177, "KGN", "Kurganskaya oblast\'"),
(4257, 1177, "KRS", "Kurskaya oblast\'"),
(4258, 1177, "LEN", "Leningradskaya oblast\'"),
(4259, 1177, "LIP", "Lipetskaya oblast\'"),
(4260, 1177, "MAG", "Magadanskaya oblast\'"),
(4261, 1177, "MOS", "Moskovskaya oblast\'"),
(4262, 1177, "MUR", "Murmanskaya oblast\'"),
(4263, 1177, "NIZ", "Nizhegorodskaya oblast\'"),
(4264, 1177, "NGR", "Novgorodskaya oblast\'"),
(4265, 1177, "NVS", "Novosibirskaya oblast\'"),
(4266, 1177, "OMS", "Omskaya oblast\'"),
(4267, 1177, "ORE", "Orenburgskaya oblast\'"),
(4268, 1177, "ORL", "Orlovskaya oblast\'"),
(4269, 1177, "PNZ", "Penzenskaya oblast\'"),
(4270, 1177, "PER", "Permskaya oblast\'"),
(4271, 1177, "PSK", "Pskovskaya oblast\'"),
(4272, 1177, "ROS", "Rostovskaya oblast\'"),
(4273, 1177, "RYA", "Ryazanskaya oblast\'"),
(4274, 1177, "SAK", "Sakhalinskaya oblast\'"),
(4275, 1177, "SAM", "Samarskaya oblast\'"),
(4276, 1177, "SAR", "Saratovskaya oblast\'"),
(4277, 1177, "SMO", "Smolenskaya oblast\'"),
(4278, 1177, "SVE", "Sverdlovskaya oblast\'"),
(4279, 1177, "TAM", "Tambovskaya oblast\'"),
(4280, 1177, "TOM", "Tomskaya oblast\'"),
(4281, 1177, "TUL", "Tul\'skaya oblast\'"),
(4282, 1177, "TVE", "Tverskaya oblast\'"),
(4283, 1177, "TYU", "Tyumenskaya oblast\'"),
(4284, 1177, "ULY", "Ul\'yanovskaya oblast\'"),
(4285, 1177, "VLA", "Vladimirskaya oblast\'"),
(4286, 1177, "VGG", "Volgogradskaya oblast\'"),
(4287, 1177, "VLG", "Vologodskaya oblast\'"),
(4288, 1177, "VOR", "Voronezhskaya oblast\'"),
(4289, 1177, "YAR", "Yaroslavskaya oblast\'"),
(4290, 1177, "MOW", "Moskva"),
(4291, 1177, "SPE", "Sankt-Peterburg"),
(4292, 1177, "YEV", "Yevreyskaya avtonomnaya oblast\'"),
(4293, 1177, "AGB", "Aginskiy Buryatskiy avtonomnyy"),
(4294, 1177, "CHU", "Chukotskiy avtonomnyy okrug"),
(4295, 1177, "EVE", "Evenkiyskiy avtonomnyy okrug"),
(4296, 1177, "KHM", "Khanty-Mansiyskiy avtonomnyy okrug"),
(4297, 1177, "KOP", "Komi-Permyatskiy avtonomnyy okrug"),
(4298, 1177, "KOR", "Koryakskiy avtonomnyy okrug"),
(4299, 1177, "NEN", "Nenetskiy avtonomnyy okrug"),
(4300, 1177, "TAY", "Taymyrskiy (Dolgano-Nenetskiy)"),
(4301, 1177, "UOB", "Ust\'-Ordynskiy Buryatskiy"),
(4302, 1177, "YAN", "Yamalo-Nenetskiy avtonomnyy okrug"),
(4303, 1178, "C", "Butare"),
(4304, 1178, "I", "Byumba"),
(4305, 1178, "E", "Cyangugu"),
(4306, 1178, "D", "Gikongoro"),
(4307, 1178, "G", "Gisenyi"),
(4308, 1178, "B", "Gitarama"),
(4309, 1178, "J", "Kibungo"),
(4310, 1178, "F", "Kibuye"),
(4311, 1178, "K", "Kigali-Rural Kigali y\' Icyaro"),
(4312, 1178, "L", "Kigali-Ville Kigali Ngari"),
(4313, 1178, "M", "Mutara"),
(4314, 1178, "H", "Ruhengeri"),
(4315, 1187, "11", "Al Batah"),
(4316, 1187, "08", "Al H,udd ash Shamallyah"),
(4317, 1187, "12", "Al Jawf"),
(4318, 1187, "03", "Al Madinah"),
(4319, 1187, "05", "Al Qasim"),
(4320, 1187, "01", "Ar Riyad"),
(4321, 1187, "14", "Asir"),
(4322, 1187, "06", "Ha\'il"),
(4323, 1187, "09", "Jlzan"),
(4324, 1187, "02", "Makkah"),
(4325, 1187, "10", "Najran"),
(4326, 1187, "07", "Tabuk"),
(4327, 1194, "CT", "Capital Territory (Honiara)"),
(4328, 1194, "GU", "Guadalcanal"),
(4329, 1194, "IS", "Isabel"),
(4330, 1194, "MK", "Makira"),
(4331, 1194, "ML", "Malaita"),
(4332, 1194, "TE", "Temotu"),
(4333, 1200, "23", "A\'ali an Nil"),
(4334, 1200, "26", "Al Bah al Ahmar"),
(4335, 1200, "18", "Al Buhayrat"),
(4336, 1200, "07", "Al Jazirah"),
(4337, 1200, "03", "Al Khartum"),
(4338, 1200, "06", "Al Qadarif"),
(4339, 1200, "22", "Al Wahdah"),
(4340, 1200, "04", "An Nil"),
(4341, 1200, "08", "An Nil al Abyaq"),
(4342, 1200, "24", "An Nil al Azraq"),
(4343, 1200, "01", "Ash Shamallyah"),
(4344, 1200, "17", "Bahr al Jabal"),
(4345, 1200, "16", "Gharb al Istiwa\'iyah"),
(4346, 1200, "14", "Gharb Ba~r al Ghazal"),
(4347, 1200, "12", "Gharb Darfur"),
(4348, 1200, "10", "Gharb Kurdufan"),
(4349, 1200, "11", "Janub Darfur"),
(4350, 1200, "13", "Janub Rurdufan"),
(4351, 1200, "20", "Jnqall"),
(4352, 1200, "05", "Kassala"),
(4353, 1200, "15", "Shamal Batr al Ghazal"),
(4354, 1200, "02", "Shamal Darfur"),
(4355, 1200, "09", "Shamal Kurdufan"),
(4356, 1200, "19", "Sharq al Istiwa\'iyah"),
(4357, 1200, "25", "Sinnar"),
(4358, 1200, "21", "Warab"),
(4359, 1204, "K", "Blekinge lan"),
(4360, 1204, "W", "Dalarnas lan"),
(4361, 1204, "I", "Gotlands lan"),
(4362, 1204, "X", "Gavleborge lan"),
(4363, 1204, "N", "Hallands lan"),
(4364, 1204, "Z", "Jamtlande lan"),
(4365, 1204, "F", "Jonkopings lan"),
(4366, 1204, "H", "Kalmar lan"),
(4367, 1204, "G", "Kronoberge lan"),
(4368, 1204, "BD", "Norrbottena lan"),
(4369, 1204, "M", "Skane lan"),
(4370, 1204, "AB", "Stockholms lan"),
(4371, 1204, "D", "Sodermanlands lan"),
(4372, 1204, "C", "Uppsala lan"),
(4373, 1204, "S", "Varmlanda lan"),
(4374, 1204, "AC", "Vasterbottens lan"),
(4375, 1204, "Y", "Vasternorrlands lan"),
(4376, 1204, "U", "Vastmanlanda lan"),
(4377, 1204, "Q", "Vastra Gotalands lan"),
(4378, 1204, "T", "Orebro lan"),
(4379, 1204, "E", "Ostergotlands lan"),
(4380, 1180, "SH", "Saint Helena"),
(4381, 1180, "AC", "Ascension"),
(4382, 1180, "TA", "Tristan da Cunha"),
(4383, 1193, "001", "Ajdovscina"),
(4384, 1193, "002", "Beltinci"),
(4385, 1193, "148", "Benedikt"),
(4386, 1193, "149", "Bistrica ob Sotli"),
(4387, 1193, "003", "Bled"),
(4388, 1193, "150", "Bloke"),
(4389, 1193, "004", "Bohinj"),
(4390, 1193, "005", "Borovnica"),
(4391, 1193, "006", "Bovec"),
(4392, 1193, "151", "Braslovce"),
(4393, 1193, "007", "Brda"),
(4394, 1193, "008", "Brezovica"),
(4395, 1193, "009", "Brezica"),
(4396, 1193, "152", "Cankova"),
(4397, 1193, "011", "Celje"),
(4398, 1193, "012", "Cerklje na Gorenjskem"),
(4399, 1193, "013", "Cerknica"),
(4400, 1193, "014", "Cerkno"),
(4401, 1193, "153", "Cerkvenjak"),
(4402, 1193, "015", "Crensovci"),
(4403, 1193, "016", "Crna na Koroskem"),
(4404, 1193, "017", "Crnomelj"),
(4405, 1193, "018", "Destrnik"),
(4406, 1193, "019", "Divaca"),
(4407, 1193, "154", "Dobje"),
(4408, 1193, "020", "Dobrepolje"),
(4409, 1193, "155", "Dobrna"),
(4410, 1193, "021", "Dobrova-Polhov Gradec"),
(4411, 1193, "156", "Dobrovnik"),
(4412, 1193, "022", "Dol pri Ljubljani"),
(4413, 1193, "157", "Dolenjske Toplice"),
(4414, 1193, "023", "Domzale"),
(4415, 1193, "024", "Dornava"),
(4416, 1193, "025", "Dravograd"),
(4417, 1193, "026", "Duplek"),
(4418, 1193, "027", "Gorenja vas-Poljane"),
(4419, 1193, "028", "Gorsnica"),
(4420, 1193, "029", "Gornja Radgona"),
(4421, 1193, "030", "Gornji Grad"),
(4422, 1193, "031", "Gornji Petrovci"),
(4423, 1193, "158", "Grad"),
(4424, 1193, "032", "Grosuplje"),
(4425, 1193, "159", "Hajdina"),
(4426, 1193, "160", "Hoce-Slivnica"),
(4427, 1193, "161", "Hodos"),
(4428, 1193, "162", "Jorjul"),
(4429, 1193, "034", "Hrastnik"),
(4430, 1193, "035", "Hrpelje-Kozina"),
(4431, 1193, "036", "Idrija"),
(4432, 1193, "037", "Ig"),
(4433, 1193, "038", "IIrska Bistrica"),
(4434, 1193, "039", "Ivancna Gorica"),
(4435, 1193, "040", "Izola"),
(4436, 1193, "041", "Jesenice"),
(4437, 1193, "163", "Jezersko"),
(4438, 1193, "042", "Jursinci"),
(4439, 1193, "043", "Kamnik"),
(4440, 1193, "044", "Kanal"),
(4441, 1193, "045", "Kidricevo"),
(4442, 1193, "046", "Kobarid"),
(4443, 1193, "047", "Kobilje"),
(4444, 1193, "048", "Jovevje"),
(4445, 1193, "049", "Komen"),
(4446, 1193, "164", "Komenda"),
(4447, 1193, "050", "Koper"),
(4448, 1193, "165", "Kostel"),
(4449, 1193, "051", "Kozje"),
(4450, 1193, "052", "Kranj"),
(4451, 1193, "053", "Kranjska Gora"),
(4452, 1193, "166", "Krizevci"),
(4453, 1193, "054", "Krsko"),
(4454, 1193, "055", "Kungota"),
(4455, 1193, "056", "Kuzma"),
(4456, 1193, "057", "Lasko"),
(4457, 1193, "058", "Lenart"),
(4458, 1193, "059", "Lendava"),
(4459, 1193, "060", "Litija"),
(4460, 1193, "061", "Ljubljana"),
(4461, 1193, "062", "Ljubno"),
(4462, 1193, "063", "Ljutomer"),
(4463, 1193, "064", "Logatec"),
(4464, 1193, "065", "Loska dolina"),
(4465, 1193, "066", "Loski Potok"),
(4466, 1193, "167", "Lovrenc na Pohorju"),
(4467, 1193, "067", "Luce"),
(4468, 1193, "068", "Lukovica"),
(4469, 1193, "069", "Majsperk"),
(4470, 1193, "070", "Maribor"),
(4471, 1193, "168", "Markovci"),
(4472, 1193, "071", "Medvode"),
(4473, 1193, "072", "Menges"),
(4474, 1193, "073", "Metlika"),
(4475, 1193, "074", "Mezica"),
(4476, 1193, "169", "Miklavz na Dravskern polju"),
(4477, 1193, "075", "Miren-Kostanjevica"),
(4478, 1193, "170", "Mirna Pec"),
(4479, 1193, "076", "Mislinja"),
(4480, 1193, "077", "Moravce"),
(4481, 1193, "078", "Moravske Toplice"),
(4482, 1193, "079", "Mozirje"),
(4483, 1193, "080", "Murska Sobota"),
(4484, 1193, "081", "Muta"),
(4485, 1193, "082", "Naklo"),
(4486, 1193, "083", "Nazarje"),
(4487, 1193, "084", "Nova Gorica"),
(4488, 1193, "085", "Nova mesto"),
(4489, 1193, "181", "Sveta Ana"),
(4490, 1193, "182", "Sveti Andraz v Slovenskih goricah"),
(4491, 1193, "116", "Sveti Jurij"),
(4492, 1193, "033", "Salovci"),
(4493, 1193, "183", "Sempeter-Vrtojba"),
(4494, 1193, "117", "Sencur"),
(4495, 1193, "118", "Sentilj"),
(4496, 1193, "119", "Sentjernej"),
(4497, 1193, "120", "Sentjur pri Celju"),
(4498, 1193, "121", "Skocjan"),
(4499, 1193, "122", "Skofja Loka"),
(4500, 1193, "123", "Skoftjica"),
(4501, 1193, "124", "Smarje pri Jelsah"),
(4502, 1193, "125", "Smartno ob Paki"),
(4503, 1193, "194", "Smartno pri Litiji"),
(4504, 1193, "126", "Sostanj"),
(4505, 1193, "127", "Store"),
(4506, 1193, "184", "Tabor"),
(4507, 1193, "010", "Tisina"),
(4508, 1193, "128", "Tolmin"),
(4509, 1193, "129", "Trbovje"),
(4510, 1193, "130", "Trebnje"),
(4511, 1193, "185", "Trnovska vas"),
(4512, 1193, "131", "Trzic"),
(4513, 1193, "186", "Trzin"),
(4514, 1193, "132", "Turnisce"),
(4515, 1193, "133", "Velenje"),
(4516, 1193, "187", "Velika Polana"),
(4517, 1193, "134", "Velika Lasce"),
(4518, 1193, "188", "Verzej"),
(4519, 1193, "135", "Videm"),
(4520, 1193, "136", "Vipava"),
(4521, 1193, "137", "Vitanje"),
(4522, 1193, "138", "Vojnik"),
(4523, 1193, "189", "Vransko"),
(4524, 1193, "140", "Vrhnika"),
(4525, 1193, "141", "Vuzenica"),
(4526, 1193, "142", "Zagorje ob Savi"),
(4527, 1193, "143", "Zavrc"),
(4528, 1193, "144", "Zrece"),
(4529, 1193, "190", "Zalec"),
(4530, 1193, "146", "Zelezniki"),
(4531, 1193, "191", "Zetale"),
(4532, 1193, "147", "Ziri"),
(4533, 1193, "192", "Zirovnica"),
(4534, 1193, "193", "Zuzemberk"),
(4535, 1192, "BC", "Banskobystrický kraj"),
(4536, 1192, "BL", "Bratislavský kraj"),
(4537, 1192, "KI", "Košický kraj"),
(4538, 1192, "NJ", "Nitriansky kraj"),
(4539, 1192, "PV", "Prešovský kraj"),
(4540, 1192, "TC", "Trenčiansky kraj"),
(4541, 1192, "TA", "Trnavský kraj"),
(4542, 1192, "ZI", "Žilinský kraj"),
(4543, 1190, "W", "Western Area (Freetown)"),
(4544, 1188, "DK", "Dakar"),
(4545, 1188, "DB", "Diourbel"),
(4546, 1188, "FK", "Fatick"),
(4547, 1188, "KL", "Kaolack"),
(4548, 1188, "KD", "Kolda"),
(4549, 1188, "LG", "Louga"),
(4550, 1188, "MT", "Matam"),
(4551, 1188, "SL", "Saint-Louis"),
(4552, 1188, "TC", "Tambacounda"),
(4553, 1188, "TH", "Thies"),
(4554, 1188, "ZG", "Ziguinchor"),
(4555, 1195, "AW", "Awdal"),
(4556, 1195, "BK", "Bakool"),
(4557, 1195, "BN", "Banaadir"),
(4558, 1195, "BY", "Bay"),
(4559, 1195, "GA", "Galguduud"),
(4560, 1195, "GE", "Gedo"),
(4561, 1195, "HI", "Hiirsan"),
(4562, 1195, "JD", "Jubbada Dhexe"),
(4563, 1195, "JH", "Jubbada Hoose"),
(4564, 1195, "MU", "Mudug"),
(4565, 1195, "NU", "Nugaal"),
(4566, 1195, "SA", "Saneag"),
(4567, 1195, "SD", "Shabeellaha Dhexe"),
(4568, 1195, "SH", "Shabeellaha Hoose"),
(4569, 1195, "SO", "Sool"),
(4570, 1195, "TO", "Togdheer"),
(4571, 1195, "WO", "Woqooyi Galbeed"),
(4572, 1201, "BR", "Brokopondo"),
(4573, 1201, "CM", "Commewijne"),
(4574, 1201, "CR", "Coronie"),
(4575, 1201, "MA", "Marowijne"),
(4576, 1201, "NI", "Nickerie"),
(4577, 1201, "PM", "Paramaribo"),
(4578, 1201, "SA", "Saramacca"),
(4579, 1201, "SI", "Sipaliwini"),
(4580, 1201, "WA", "Wanica"),
(4581, 1207, "P", "Principe"),
(4582, 1207, "S", "Sao Tome"),
(4583, 1066, "AH", "Ahuachapan"),
(4584, 1066, "CA", "Cabanas"),
(4585, 1066, "CU", "Cuscatlan"),
(4586, 1066, "CH", "Chalatenango"),
(4587, 1066, "MO", "Morazan"),
(4588, 1066, "SM", "San Miguel"),
(4589, 1066, "SS", "San Salvador"),
(4590, 1066, "SA", "Santa Ana"),
(4591, 1066, "SV", "San Vicente"),
(4592, 1066, "SO", "Sonsonate"),
(4593, 1066, "US", "Usulutan"),
(4594, 1206, "HA", "Al Hasakah"),
(4595, 1206, "LA", "Al Ladhiqiyah"),
(4596, 1206, "QU", "Al Qunaytirah"),
(4597, 1206, "RA", "Ar Raqqah"),
(4598, 1206, "SU", "As Suwayda\'"),
(4599, 1206, "DR", "Dar\'a"),
(4600, 1206, "DY", "Dayr az Zawr"),
(4601, 1206, "DI", "Dimashq"),
(4602, 1206, "HL", "Halab"),
(4603, 1206, "HM", "Hamah"),
(4604, 1206, "HI", "Jim\'"),
(4605, 1206, "ID", "Idlib"),
(4606, 1206, "RD", "Rif Dimashq"),
(4607, 1206, "TA", "Tarts"),
(4608, 1203, "HH", "Hhohho"),
(4609, 1203, "LU", "Lubombo"),
(4610, 1203, "MA", "Manzini"),
(4611, 1203, "SH", "Shiselweni"),
(4612, 1043, "BA", "Batha"),
(4613, 1043, "BI", "Biltine"),
(4614, 1043, "BET", "Borkou-Ennedi-Tibesti"),
(4615, 1043, "CB", "Chari-Baguirmi"),
(4616, 1043, "GR", "Guera"),
(4617, 1043, "KA", "Kanem"),
(4618, 1043, "LC", "Lac"),
(4619, 1043, "LO", "Logone-Occidental"),
(4620, 1043, "LR", "Logone-Oriental"),
(4621, 1043, "MK", "Mayo-Kebbi"),
(4622, 1043, "MC", "Moyen-Chari"),
(4623, 1043, "OD", "Ouaddai"),
(4624, 1043, "SA", "Salamat"),
(4625, 1043, "TA", "Tandjile"),
(4626, 1214, "K", "Kara"),
(4627, 1214, "M", "Maritime (Region)"),
(4628, 1214, "S", "Savannes"),
(4629, 1211, "10", "Krung Thep Maha Nakhon Bangkok"),
(4630, 1211, "S", "Phatthaya"),
(4631, 1211, "37", "Amnat Charoen"),
(4632, 1211, "15", "Ang Thong"),
(4633, 1211, "31", "Buri Ram"),
(4634, 1211, "24", "Chachoengsao"),
(4635, 1211, "18", "Chai Nat"),
(4636, 1211, "36", "Chaiyaphum"),
(4637, 1211, "22", "Chanthaburi"),
(4638, 1211, "50", "Chiang Mai"),
(4639, 1211, "57", "Chiang Rai"),
(4640, 1211, "20", "Chon Buri"),
(4641, 1211, "86", "Chumphon"),
(4642, 1211, "46", "Kalasin"),
(4643, 1211, "62", "Kamphasng Phet"),
(4644, 1211, "71", "Kanchanaburi"),
(4645, 1211, "40", "Khon Kaen"),
(4646, 1211, "81", "Krabi"),
(4647, 1211, "52", "Lampang"),
(4648, 1211, "51", "Lamphun"),
(4649, 1211, "42", "Loei"),
(4650, 1211, "16", "Lop Buri"),
(4651, 1211, "58", "Mae Hong Son"),
(4652, 1211, "44", "Maha Sarakham"),
(4653, 1211, "49", "Mukdahan"),
(4654, 1211, "26", "Nakhon Nayok"),
(4655, 1211, "73", "Nakhon Pathom"),
(4656, 1211, "48", "Nakhon Phanom"),
(4657, 1211, "30", "Nakhon Ratchasima"),
(4658, 1211, "60", "Nakhon Sawan"),
(4659, 1211, "80", "Nakhon Si Thammarat"),
(4660, 1211, "55", "Nan"),
(4661, 1211, "96", "Narathiwat"),
(4662, 1211, "39", "Nong Bua Lam Phu"),
(4663, 1211, "43", "Nong Khai"),
(4664, 1211, "12", "Nonthaburi"),
(4665, 1211, "13", "Pathum Thani"),
(4666, 1211, "94", "Pattani"),
(4667, 1211, "82", "Phangnga"),
(4668, 1211, "93", "Phatthalung"),
(4669, 1211, "56", "Phayao"),
(4670, 1211, "67", "Phetchabun"),
(4671, 1211, "76", "Phetchaburi"),
(4672, 1211, "66", "Phichit"),
(4673, 1211, "65", "Phitsanulok"),
(4674, 1211, "54", "Phrae"),
(4675, 1211, "14", "Phra Nakhon Si Ayutthaya"),
(4676, 1211, "83", "Phaket"),
(4677, 1211, "25", "Prachin Buri"),
(4678, 1211, "77", "Prachuap Khiri Khan"),
(4679, 1211, "85", "Ranong"),
(4680, 1211, "70", "Ratchaburi"),
(4681, 1211, "21", "Rayong"),
(4682, 1211, "45", "Roi Et"),
(4683, 1211, "27", "Sa Kaeo"),
(4684, 1211, "47", "Sakon Nakhon"),
(4685, 1211, "11", "Samut Prakan"),
(4686, 1211, "74", "Samut Sakhon"),
(4687, 1211, "75", "Samut Songkhram"),
(4688, 1211, "19", "Saraburi"),
(4689, 1211, "91", "Satun"),
(4690, 1211, "17", "Sing Buri"),
(4691, 1211, "33", "Si Sa Ket"),
(4692, 1211, "90", "Songkhla"),
(4693, 1211, "64", "Sukhothai"),
(4694, 1211, "72", "Suphan Buri"),
(4695, 1211, "84", "Surat Thani"),
(4696, 1211, "32", "Surin"),
(4697, 1211, "