oci_migration fix wrong keywords associated with products
This commit is contained in:
parent
8e48fc5ea1
commit
923c3e0f6a
1 changed files with 3 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ use Illuminate\Support\Facades\DB;
|
|||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\ItemNotFoundException;
|
||||
use Illuminate\Support\Str;
|
||||
use Symfony\Component\Console\Helper\ProgressBar;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
|
|
@ -140,7 +141,7 @@ return new class extends Migration
|
|||
->explode(PHP_EOL)->map(fn (string $other_allegation) => Str::of($other_allegation)->squish())
|
||||
->unique();
|
||||
|
||||
$MOTKS = Keyword::all();
|
||||
$MOTKS = Keyword::query()->where('keyword_cat', 'LIKE', 'product_%')->get();
|
||||
/** @var \Illuminate\Support\Collection<string,string> */
|
||||
$START_SOURCES = $this->getQuery('SOURCE')->get();
|
||||
/** @var \Illuminate\Support\Collection<string,string> */
|
||||
|
|
@ -239,7 +240,7 @@ return new class extends Migration
|
|||
fn (Keyword $keyword) => Str::of($keyword->label)->ascii()->replace(' ', '')
|
||||
== Str::of($motk)->trim()->ascii()->replace(' ', '')
|
||||
);
|
||||
} catch (\Exception) {
|
||||
} catch (ItemNotFoundException) {
|
||||
dump(
|
||||
$motk,
|
||||
$MOTKS->pluck('label')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue