Migration fixes

This commit is contained in:
Jérémy Munsch 2023-10-02 16:00:50 +02:00
parent adae4da02f
commit d70135b6af
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC

View file

@ -368,9 +368,9 @@ return new class extends Migration
} catch (\Exception) {
throw new \Error("brand` {$brandName}` not found");
}
$url = $row->URL ? Str::of(url($row->URL))->lower() : null;
$url = $row->URL ? Str::lower(url($row->URL)) : null;
$date_saisie = $row->DATE_SAISIE ? $this->tryToParseCarbon($row->DATE_SAISIE, true) : null;
$is_tasted = Str::of($row->DEGUSTER_O_N)->lower() === 'o' ? true : false;
$is_tasted = Str::lower($row->DEGUSTER_O_N) === 'o' ? true : false;
$claimList = collect([
$row->ALLEG0, $row->ALLEG1, $row->ALLEG2
])->filter()->map(fn (string $alleg) => $resolveAllegation($alleg));
@ -669,7 +669,7 @@ return new class extends Migration
$tableComment = "{$tableColumn->name} {$tableColumn->type} {$tableColumn->size}";
switch ($tableColumn->type) {
case 'NUMBER':
$table->bigInteger($tableColumn->name)
$table->double($tableColumn->name)
->nullable()->comment($tableComment);
break;
case 'VARCHAR2':