Skip to content

Commit

Permalink
Fix: #375 Add type to Cambodia's provinces and add missing province
Browse files Browse the repository at this point in the history
  • Loading branch information
dr5hn committed Mar 13, 2022
1 parent ecf5ece commit b1e892c
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions sql/world.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
DROP TABLE IF EXISTS `cities`;
DROP TABLE IF EXISTS `states`;
DROP TABLE IF EXISTS `countries`;

-- -------------------------------------------------------------
-- TablePlus 4.5.2(402)
--
-- https://tableplus.com/
--
-- Database: world
-- Generation Time: 2022-03-13 13:06:27.7550
-- Generation Time: 2022-03-13 13:42:32.2270
-- -------------------------------------------------------------


Expand All @@ -22,6 +18,7 @@ DROP TABLE IF EXISTS `countries`;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


DROP TABLE IF EXISTS `cities`;
CREATE TABLE `cities` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
Expand All @@ -42,6 +39,7 @@ CREATE TABLE `cities` (
CONSTRAINT `cities_ibfk_2` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=149308 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;

DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
Expand Down Expand Up @@ -70,6 +68,7 @@ CREATE TABLE `countries` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

DROP TABLE IF EXISTS `states`;
CREATE TABLE `states` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
Expand All @@ -87,7 +86,7 @@ CREATE TABLE `states` (
PRIMARY KEY (`id`),
KEY `country_region` (`country_id`),
CONSTRAINT `country_region_final` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5070 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;
) ENGINE=InnoDB AUTO_INCREMENT=5071 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;

INSERT INTO `cities` (`id`, `name`, `state_id`, `state_code`, `country_id`, `country_code`, `latitude`, `longitude`, `created_at`, `updated_at`, `flag`, `wikiDataId`) VALUES
(1, 'Andorra la Vella', 488, '07', 6, 'AD', 42.50779000, 1.52109000, '2019-10-05 23:58:06', '2019-10-05 23:58:06', 1, 'Q1863'),
Expand Down Expand Up @@ -152920,29 +152919,29 @@ INSERT INTO `states` (`id`, `name`, `country_id`, `country_code`, `fips_code`, `
(3969, 'Sulaymaniyah Governorate', 104, 'IQ', '05', 'SU', NULL, 35.54663480, 45.30036830, '2019-10-05 23:18:56', '2020-12-21 21:20:22', 1, 'Q213182'),
(3970, 'Wasit Governorate', 104, 'IQ', '16', 'WA', NULL, 32.60240940, 45.75209850, '2019-10-05 23:18:56', '2020-12-21 21:20:22', 1, 'Q189747'),
(3971, 'Kirkuk Governorate', 104, 'IQ', '13', 'KI', NULL, 35.32920140, 43.94367880, '2019-10-05 23:18:56', '2020-12-21 21:20:22', 1, 'Q193268'),
(3972, 'Svay Rieng Province', 37, 'KH', '18', '20', NULL, 11.14272200, 105.82902980, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q751864'),
(3973, 'Preah Vihear Province', 37, 'KH', '13', '13', NULL, 14.00857970, 104.84546190, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q502151'),
(3974, 'Prey Veng Province', 37, 'KH', '14', '14', NULL, 11.38024420, 105.50054830, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q856788'),
(3975, 'Takéo Province', 37, 'KH', '19', '21', NULL, 10.93215190, 104.79877100, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q613345'),
(3976, 'Battambang Province', 37, 'KH', '29', '2', NULL, 13.02869710, 102.98961500, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q810923'),
(3977, 'Pursat Province', 37, 'KH', '12', '15', NULL, 12.27209560, 103.72891670, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q834464'),
(3978, 'Kep Province', 37, 'KH', '26', '23', NULL, 10.53608900, 104.35591580, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q852089'),
(3979, 'Kampong Chhnang Province', 37, 'KH', '03', '4', NULL, 12.13923520, 104.56552730, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q877468'),
(3980, 'Pailin Province', 37, 'KH', '30', '24', NULL, 12.90929620, 102.66755750, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q506646'),
(3981, 'Kampot Province', 37, 'KH', '21', '7', NULL, 10.73253510, 104.37919120, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q748470'),
(3982, 'Koh Kong Province', 37, 'KH', '08', '9', NULL, 11.57628040, 103.35872880, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q466000'),
(3983, 'Kandal Province', 37, 'KH', '07', '8', NULL, 11.22373830, 105.12589550, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q466031'),
(3984, 'Banteay Meanchey Province', 37, 'KH', '25', '1', NULL, 13.75319140, 102.98961500, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q3817'),
(3985, 'Mondulkiri Province', 37, 'KH', '10', '11', NULL, 12.78794270, 107.10119310, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q652830'),
(3986, 'Kratié Province', 37, 'KH', '09', '10', NULL, 12.50436080, 105.96998780, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q785896'),
(3987, 'Oddar Meanchey Province', 37, 'KH', '27', '22', NULL, 14.16097380, 103.82162610, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q629538'),
(3988, 'Kampong Speu Province', 37, 'KH', '04', '5', NULL, 11.61551090, 104.37919120, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q652867'),
(3989, 'Sihanoukville Province', 37, 'KH', '28', '18', NULL, 10.75818990, 103.82162610, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q220966'),
(3990, 'Ratanakiri Province', 37, 'KH', '23', '16', NULL, 13.85766070, 107.10119310, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q747846'),
(3991, 'Kampong Cham Province', 37, 'KH', '02', '3', NULL, 12.09829180, 105.31311850, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q142258'),
(3992, 'Siem Reap Province', 37, 'KH', '24', '17', NULL, 13.33026600, 104.10013260, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q652818'),
(3993, 'Stung Treng Province', 37, 'KH', '17', '19', NULL, 13.57647300, 105.96998780, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q837889'),
(3994, 'Phnom Penh', 37, 'KH', '22', '12', NULL, 11.55637380, 104.92820990, '2019-10-05 23:18:56', '2020-12-21 21:20:21', 1, 'Q1850'),
(3972, 'Svay Rieng', 37, 'KH', '18', '20', 'province', 11.14272200, 105.82902980, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q751864'),
(3973, 'Preah Vihear', 37, 'KH', '13', '13', 'province', 14.00857970, 104.84546190, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q502151'),
(3974, 'Prey Veng', 37, 'KH', '14', '14', 'province', 11.38024420, 105.50054830, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q856788'),
(3975, 'Takeo', 37, 'KH', '19', '21', 'province', 10.93215190, 104.79877100, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q613345'),
(3976, 'Battambang', 37, 'KH', '29', '2', 'province', 13.02869710, 102.98961500, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q810923'),
(3977, 'Pursat', 37, 'KH', '12', '15', 'province', 12.27209560, 103.72891670, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q834464'),
(3978, 'Kep', 37, 'KH', '26', '23', 'province', 10.53608900, 104.35591580, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q852089'),
(3979, 'Kampong Chhnang', 37, 'KH', '03', '4', 'province', 12.13923520, 104.56552730, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q877468'),
(3980, 'Pailin', 37, 'KH', '30', '24', 'province', 12.90929620, 102.66755750, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q506646'),
(3981, 'Kampot', 37, 'KH', '21', '7', 'province', 10.73253510, 104.37919120, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q748470'),
(3982, 'Koh Kong', 37, 'KH', '08', '9', 'province', 11.57628040, 103.35872880, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q466000'),
(3983, 'Kandal', 37, 'KH', '07', '8', 'province', 11.22373830, 105.12589550, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q466031'),
(3984, 'Banteay Meanchey', 37, 'KH', '25', '1', 'province', 13.75319140, 102.98961500, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q3817'),
(3985, 'Mondulkiri', 37, 'KH', '10', '11', 'province', 12.78794270, 107.10119310, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q652830'),
(3986, 'Kratie', 37, 'KH', '09', '10', 'province', 12.50436080, 105.96998780, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q785896'),
(3987, 'Oddar Meanchey', 37, 'KH', '27', '22', 'province', 14.16097380, 103.82162610, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q629538'),
(3988, 'Kampong Speu', 37, 'KH', '04', '5', 'province', 11.61551090, 104.37919120, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q652867'),
(3989, 'Sihanoukville', 37, 'KH', '28', '18', 'province', 10.75818990, 103.82162610, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q220966'),
(3990, 'Ratanakiri', 37, 'KH', '23', '16', 'province', 13.85766070, 107.10119310, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q747846'),
(3991, 'Kampong Cham', 37, 'KH', '02', '3', 'province', 12.09829180, 105.31311850, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q142258'),
(3992, 'Siem Reap', 37, 'KH', '24', '17', 'province', 13.33026600, 104.10013260, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q652818'),
(3993, 'Stung Treng', 37, 'KH', '17', '19', 'province', 13.57647300, 105.96998780, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q837889'),
(3994, 'Phnom Penh', 37, 'KH', '22', '12', 'autonomous municipality', 11.55637380, 104.92820990, '2019-10-05 23:18:56', '2022-03-13 13:39:56', 1, 'Q1850'),
(3995, 'North Hamgyong Province', 115, 'KP', '17', '09', NULL, 41.81487580, 129.45819550, '2019-10-05 23:18:56', '2020-12-21 21:20:23', 1, 'Q109361'),
(3996, 'Ryanggang Province', 115, 'KP', '13', '10', NULL, 41.23189210, 128.50763590, '2019-10-05 23:18:57', '2020-12-21 21:20:23', 1, 'Q110171'),
(3997, 'South Pyongan Province', 115, 'KP', '15', '02', NULL, 39.35391780, 126.16827100, '2019-10-05 23:18:57', '2020-12-21 21:20:23', 1, 'Q109380'),
Expand Down Expand Up @@ -153977,7 +153976,8 @@ INSERT INTO `states` (`id`, `name`, `country_id`, `country_code`, `fips_code`, `
(5065, 'French Southern and Antarctic Lands', 75, 'FR', 'FS', 'TF', 'overseas territory', -47.54466040, 51.28375420, '2021-12-11 17:52:02', '2021-12-11 18:13:21', 1, 'Q129003'),
(5067, 'Sharqia', 65, 'EG', '13', 'SHR', 'governorate', 30.67305450, 31.15932470, '2022-01-16 12:06:48', '2022-01-16 12:06:48', 1, 'Q31074'),
(5068, 'Loja', 64, 'EC', '12', 'L', 'province', -3.99313000, -79.20422000, '2022-01-20 15:19:51', '2022-01-22 14:51:12', 1, 'Q504238'),
(5069, 'Karlovac County', 55, 'HR', '05', '05', NULL, 45.26133520, 15.52542016, '2022-03-04 15:22:53', '2022-03-04 15:22:53', 1, 'Q57071');
(5069, 'Karlovac County', 55, 'HR', '05', '05', NULL, 45.26133520, 15.52542016, '2022-03-04 15:22:53', '2022-03-04 15:22:53', 1, 'Q57071'),
(5070, 'Kampong Thom', 37, 'KH', '05', '6', 'province', 12.81674850, 103.84131040, '2019-10-05 23:18:56', '2022-03-13 13:41:34', 1, 'Q502148');



Expand All @@ -153987,4 +153987,4 @@ INSERT INTO `states` (`id`, `name`, `country_id`, `country_code`, `fips_code`, `
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

0 comments on commit b1e892c

Please sign in to comment.