35 lines
819 B
PHP
35 lines
819 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
||
|
class UpdateSettingsTableAllowNullable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
//allow value column in settings table to be nullable
|
||
|
Schema::table('settings', function (Blueprint $table) {
|
||
|
$table->string('value')->nullable()->change();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
//disallow value column in settings table to be nullable
|
||
|
Schema::table('settings', function (Blueprint $table) {
|
||
|
$table->string('value')->nullable(false)->change();
|
||
|
});
|
||
|
}
|
||
|
}
|