improve country handling

This commit is contained in:
Dennis Eichhorn 2021-02-06 13:49:11 +01:00
parent 8a1ab7fe6b
commit 62350c7a2e
2 changed files with 14 additions and 2 deletions

View File

@ -29,6 +29,16 @@
"name": "country_numeric", "name": "country_numeric",
"type": "INT(11)", "type": "INT(11)",
"null": false "null": false
},
"country_region": {
"name": "country_region",
"type": "VARCHAR(15)",
"null": true
},
"country_developed": {
"name": "country_developed",
"type": "TINYINT",
"null": false
} }
} }
}, },

View File

@ -65,7 +65,7 @@ final class Installer extends InstallerAbstract
$con = $dbPool->get(); $con = $dbPool->get();
$query = new Builder($con); $query = new Builder($con);
$query->insert('country_name', 'country_code2', 'country_code3', 'country_numeric') $query->insert('country_name', 'country_code2', 'country_code3', 'country_numeric', 'country_region', 'country_developed')
->into('country'); ->into('country');
$querySqlite = new Builder($sqlite); $querySqlite = new Builder($sqlite);
@ -76,7 +76,9 @@ final class Installer extends InstallerAbstract
$country['country_name'] === null ? null : \trim($country['country_name']), $country['country_name'] === null ? null : \trim($country['country_name']),
$country['country_code2'] === null ? null : \trim($country['country_code2']), $country['country_code2'] === null ? null : \trim($country['country_code2']),
$country['country_code3'] === null ? null : \trim($country['country_code3']), $country['country_code3'] === null ? null : \trim($country['country_code3']),
$country['country_numeric'] $country['country_numeric'],
$country['country_region'],
(int) $country['country_developed']
); );
} }