id(); $table->string('guid')->unique()->nullable(); $table->string('domain')->nullable(); $table->string('name'); $table->string('username')->unique()->nullable(); $table->string('password')->nullable(); $table->rememberToken(); $table->unsignedBigInteger('loaner_type_id')->default(1); $table->unsignedBigInteger('role_id')->default(2); $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); $table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP')); $table->timestamp('deleted_at')->nullable(); $table->foreign('loaner_type_id')->references('id')->on('loaner_types')->onDelete('cascade'); $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } };