Fixes for migrations
This commit is contained in:
parent
139c9787ad
commit
6c7e9e69fe
|
|
@ -95,16 +95,19 @@ return new class extends Migration
|
||||||
Model::unguard();
|
Model::unguard();
|
||||||
|
|
||||||
foreach ($regions as $region) {
|
foreach ($regions as $region) {
|
||||||
|
|
||||||
|
if(!Country::find($region['id']))
|
||||||
|
{
|
||||||
Country::create($region);
|
Country::create($region);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Model::reguard();
|
Model::reguard();
|
||||||
|
|
||||||
|
// Company::query()->cursor()->each(function ($company) {
|
||||||
Company::query()->cursor()->each(function ($company) {
|
// $company->tax_data = new \App\DataMapper\Tax\TaxModel($company->tax_data);
|
||||||
$company->tax_data = new \App\DataMapper\Tax\TaxModel($company->tax_data);
|
// $company->save();
|
||||||
$company->save();
|
// });
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue