make comment nullable

This commit is contained in:
Edmond Teh
2020-09-04 15:25:08 +08:00
parent 3d2dec4699
commit fb38cee6bb
2 changed files with 64 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeDefaultCommentNull extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoice_statuses', function (Blueprint $table) {
$table->string('comment')->default(null)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoice_statuses', function (Blueprint $table) {
//
});
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeToNullableCommentNull extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoice_statuses', function (Blueprint $table) {
$table->string('comment')->default(null)->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoice_statuses', function (Blueprint $table) {
//
});
}
}