Skip to content

Commit

Permalink
Fix down() for MakeSettingsValueNullable migration. (#4838)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Fletcher <fletch3555@users.noreply.github.com>
  • Loading branch information
likemusic and fletch3555 committed Apr 14, 2020
1 parent afea534 commit f4e6775
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions migrations/2018_03_16_000000_make_settings_value_nullable.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;

class MakeSettingsValueNullable extends Migration
{
Expand All @@ -25,6 +26,8 @@ public function up()
*/
public function down()
{
DB::table('settings')->whereNull('value')->update(['value' => '']);

Schema::table('settings', function (Blueprint $table) {
$table->text('value')->nullable(false)->change();
});
Expand Down

0 comments on commit f4e6775

Please sign in to comment.