This commit is contained in:
Alexis Gousseau 2023-06-12 15:26:11 +02:00
parent f7f4b4271a
commit 39729a02ef
3 changed files with 3 additions and 4 deletions

1
.gitignore vendored
View file

@ -18,3 +18,4 @@ MIG/errors_sql.txt
public/js
public/css
public/assets
auth.json

4
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "clients/V2"]
path = clients/V2
url = https://voight001.lesidc.com/crm-client
path = clients/V2
url = git@lab.s-web.fr:ldc-web/projets/crm-client.git

View file

@ -20,9 +20,7 @@ class ParseCountryOnCustomerInfos extends Migration
$perPage = 10000;
$currentPage = 0;
$totalPages = ceil(CustomerInfo::query()->count() / $perPage);
dump("items per page $perPage");
for ($currentPage; $currentPage <= $totalPages; $currentPage++) {
dump("page $currentPage");
DB::transaction(function () use ($currentPage, $perPage) {
collect(CustomerInfo::query()
->simplePaginate($perPage, ['*'], 'page', $currentPage)->items())