ctrlpanel/database/migrations/2022_01_14_234418_update_settings_table_allow_nullable.php
2023-01-05 17:03:31 +00:00

35 lines
798 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class 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();
});
}
};