parent
042e78583e
commit
e381de5e9c
1 changed files with 4 additions and 3 deletions
|
|
@ -99,13 +99,12 @@ return new class extends Migration
|
|||
$this->fixForeignKeyActionOnProcesses();
|
||||
|
||||
// ! DEV: Comment this after running once, to develop a migration without remigrating every temp table.
|
||||
$this->createAndFillTempTables();
|
||||
// $this->createAndFillTempTables();
|
||||
|
||||
// * Migrate PRODUCTS, comment all except the one you want to develop here.
|
||||
$this->migrateBrands();
|
||||
$this->migrateProducts();
|
||||
|
||||
|
||||
// ! DEV: Add a die here to develop migration and prevent droping temp tables
|
||||
// dd('');
|
||||
|
||||
|
|
@ -347,7 +346,9 @@ return new class extends Migration
|
|||
|
||||
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
|
||||
$pictureKey = $files ? $files->map(fn (string $filePath, string $fileName) => $fileName)
|
||||
->first(fn ($fileName) => preg_match('/ref-[0-9a-z]*.jpg/', $fileName) !== false) : null;
|
||||
->first(function ($fileName) {
|
||||
return preg_match('/(ref-?[0-9a-z]{0,}.jpg)/', $fileName) === 1;
|
||||
}) : null;
|
||||
$picture = $files ? $files->get($pictureKey) : null;
|
||||
if ($files) {
|
||||
$files->pull($pictureKey);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue