string('id', 20)->primary(); $table->string('name'); $table->string('email')->unique(); $table->string('tel')->unique(); $table->date('birthday')->nullable(); $table->string('department_id', 7); $table->string('title_id', 5); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->boolean('active')->default(true); $table->rememberToken(); $table->timestamps(); $table->foreign('department_id') ->references('id') ->on('departments') ->onUpdate('cascade'); $table->foreign('title_id') ->references('id') ->on('titles') ->onUpdate('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }