Fix: update single name in migrations
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
d9adb526ce
commit
8b3b3de9a8
|
@ -25,7 +25,7 @@ return new class extends Migration
|
||||||
|
|
||||||
foreach (DB::table('users')->get() as $user) {
|
foreach (DB::table('users')->get() as $user) {
|
||||||
[$firstname, $lastname] = explode(' ', $user->name);
|
[$firstname, $lastname] = explode(' ', $user->name);
|
||||||
DB::table('users')->where('id', $user->id)->update(['firstname' => $firstname, 'lastname' => $lastname]);
|
DB::table('users')->where('id', $user->id)->update(['firstname' => $firstname ?? '', 'lastname' => $lastname ?? '']);
|
||||||
}
|
}
|
||||||
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
|
Loading…
Reference in New Issue