Skip to content

Commit 429d302

Browse files
authored
update countries table (#1316)
* update countries table * update countries table * update countries table
1 parent 71e8337 commit 429d302

File tree

8 files changed

+1012
-1102
lines changed

8 files changed

+1012
-1102
lines changed

bin/Commands/ExportJson.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8181
$countriesArray[$m]['subregion'] = $row['subregion'];
8282
$countriesArray[$m]['subregion_id'] = $row['subregion_id'] !== null ? (int)$row['subregion_id'] : null;
8383
$countriesArray[$m]['nationality'] = $row['nationality'];
84+
$countriesArray[$m]['area_sq_km'] = $row['area_sq_km'] !== null ? (int)$row['area_sq_km'] : null;
85+
$countriesArray[$m]['postal_code_format'] = $row['postal_code_format'];
86+
$countriesArray[$m]['postal_code_regex'] = $row['postal_code_regex'];
8487
$countriesArray[$m]['timezones'] = json_decode($row['timezones'], true);
8588
$countriesArray[$m]['translations'] = json_decode($row['translations'], true);
8689
$countriesArray[$m]['latitude'] = $row['latitude'];

bin/Commands/ExportSqlServer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ private function generateTableSchema(string $table): string
7676
subregion NVARCHAR(255) NULL,
7777
subregion_id INT NULL,
7878
nationality NVARCHAR(255) NULL,
79+
area_sq_km BIGINT NULL,
80+
postal_code_format NVARCHAR(255) NULL,
81+
postal_code_regex NVARCHAR(255) NULL,
7982
timezones NVARCHAR(MAX),
8083
translations NVARCHAR(MAX),
8184
latitude DECIMAL(10,8) NULL,

bin/db/schema.sql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ DROP TABLE IF EXISTS `countries`;
1919
DROP TABLE IF EXISTS `subregions`;
2020
DROP TABLE IF EXISTS `regions`;
2121

22-
-- MySQL dump 10.13 Distrib 8.0.43, for Linux (x86_64)
22+
-- MySQL dump 10.13 Distrib 9.3.0, for macos15.2 (arm64)
2323
--
2424
-- Host: localhost Database: world
2525
-- ------------------------------------------------------
26-
-- Server version 8.0.43-0ubuntu0.24.04.2
26+
-- Server version 9.3.0
2727

2828
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
2929
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -101,6 +101,9 @@ CREATE TABLE `countries` (
101101
`subregion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
102102
`subregion_id` mediumint unsigned DEFAULT NULL,
103103
`nationality` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
104+
`area_sq_km` double DEFAULT NULL,
105+
`postal_code_format` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
106+
`postal_code_regex` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
104107
`timezones` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
105108
`translations` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
106109
`latitude` decimal(10,8) DEFAULT NULL,
@@ -195,6 +198,6 @@ CREATE TABLE `cities` (
195198
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
196199
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
197200

198-
-- Dump completed on 2025-12-03 6:37:32
201+
-- Dump completed on 2025-12-03 18:48:35
199202

200203
SET FOREIGN_KEY_CHECKS=1;

contributions/cities/CW.json

Lines changed: 0 additions & 233 deletions
This file was deleted.

0 commit comments

Comments
 (0)