Bulletinboard/database/migrations/2014_10_12_000000_create_us...

39 lines
921 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('objectguid')->nullable();
// $table->string('name');
$table->string('username');
$table->string('password');
$table->rememberToken();
$table->timestamps();
$table->bigInteger("role_id")->unsigned()->default(1);
$table->foreign('role_id')->references("id")->on("roles");
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}