Add historic airports to database

This commit is contained in:
dredgy committed 2026-08-22 14:13:37 +10:00
1 parent 3c66a3945c
commit 4a9b1ad56a
5 files changed
+181 -13

No files matched your search

@@ -17,7 +17,10 @@ class PopulateAirportTimezones extends Command
*/
public function handle()
{
Airport::whereNull('timezone')->chunkById(100, function ($airports) {
Airport::where(function ($query) {
$query->whereNull('timezone')
->orWhere('timezone', 'Undefined');
})->chunkById(100, function ($airports) {
foreach ($airports as $airport) {
$zoneName = null;
$attempts = 0;