Differential D1114 Diff 2917 src/database/migrations/2020_03_27_134609_user_table_add_role_column.php
Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_03_27_134609_user_table_add_role_column.php
- This file was added.
<?php | |||||
use Illuminate\Database\Migrations\Migration; | |||||
use Illuminate\Database\Schema\Blueprint; | |||||
use Illuminate\Support\Facades\Schema; | |||||
// phpcs:ignore | |||||
class UserTableAddRoleColumn extends Migration | |||||
{ | |||||
/** | |||||
* Run the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function up() | |||||
{ | |||||
Schema::table( | |||||
'users', | |||||
function (Blueprint $table) { | |||||
$table->string('role')->nullable(); | |||||
} | |||||
); | |||||
} | |||||
/** | |||||
* Reverse the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function down() | |||||
{ | |||||
Schema::table( | |||||
'users', | |||||
function (Blueprint $table) { | |||||
$table->dropColumn('role'); | |||||
} | |||||
); | |||||
} | |||||
} |