Altered user_name column in emails table

added migration to make user_name column as nullable in emails table
This commit is contained in:
Manish Verma
2018-08-13 13:29:32 +05:30
parent fe85bf4e5a
commit 239c2d04d6
3 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AlterEmailsTableMakeUsernameColumnNullable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('emails', function (Blueprint $table) {
$table->string('user_name')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('emails', function (Blueprint $table) {
$table->string('user_name')->nullable(false)->change();
});
}
}