Add comprehensive Architecture Decision Records (ADRs) detailing the new shipment review state machine, review history domain, and customer resubmission logic. This documentation establishes the separation between operational shipment status and the review lifecycle. Additionally, perform repository cleanup by removing obsolete Postman collections, environment files, test scripts, and unused migrations. - Add ADR-001 through ADR-005 regarding review workflow and state. - Add shipment review handoff documentation. - Remove redundant Postman resources and local environment configs. - Remove `test_pdf_generation.php` and `resubmit-test.json`. - Remove unused `shipment_packages` migration. - Rename and reorganize one-off maintenance scripts.
28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
<?php
|
|
$map = [
|
|
'IR' => '+98', 'AE' => '+971', 'AF' => '+93', 'AL' => '+355', 'AM' => '+374',
|
|
'AZ' => '+994', 'BH' => '+973', 'BY' => '+375', 'CN' => '+86', 'DE' => '+49',
|
|
'FR' => '+33', 'GB' => '+44', 'IN' => '+91', 'IQ' => '+964', 'KG' => '+996',
|
|
'KW' => '+965', 'KZ' => '+7', 'LB' => '+961', 'NL' => '+31', 'OM' => '+968',
|
|
'PK' => '+92', 'PS' => '+970', 'QA' => '+974', 'RU' => '+7', 'SA' => '+966',
|
|
'SY' => '+963', 'TJ' => '+992', 'TR' => '+90', 'TM' => '+993', 'UA' => '+380',
|
|
'US' => '+1', 'UZ' => '+998',
|
|
];
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
$app = require_once __DIR__ . '/bootstrap/app.php';
|
|
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
|
|
|
|
use App\Models\Country;
|
|
|
|
$updated = 0;
|
|
foreach ($map as $iso => $code) {
|
|
$cnt = Country::where('iso_code', $iso)->update(['calling_code' => $code]);
|
|
if ($cnt > 0) {
|
|
$updated += $cnt;
|
|
echo "Updated {$iso} => {$code}\n";
|
|
}
|
|
}
|
|
|
|
echo "\nDone. Total updated: {$updated}\n";
|
|
echo "Countries with calling_code: " . Country::whereNotNull('calling_code')->count() . "\n"; |