Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit f4e6775

Browse files
Fix down() for MakeSettingsValueNullable migration. (#4838)
Co-authored-by: Eric Fletcher <[email protected]>
1 parent afea534 commit f4e6775

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

migrations/2018_03_16_000000_make_settings_value_nullable.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Illuminate\Database\Migrations\Migration;
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
6+
use Illuminate\Support\Facades\DB;
67

78
class MakeSettingsValueNullable extends Migration
89
{
@@ -25,6 +26,8 @@ public function up()
2526
*/
2627
public function down()
2728
{
29+
DB::table('settings')->whereNull('value')->update(['value' => '']);
30+
2831
Schema::table('settings', function (Blueprint $table) {
2932
$table->text('value')->nullable(false)->change();
3033
});

0 commit comments

Comments
 (0)