dokter-telekonsultasi/database/migrations/2014_10_12_000000_create_users_table.php
2025-03-26 10:01:46 +07:00

42 lines
1.0 KiB
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('username')->unique();
$table->string('first_name');
$table->string('last_name');
$table->string('email')->unique();
$table->string('phone_number')->nullable();
$table->timestamp('email_verified_at')->nullable();
$table->string('user_type')->default('user');
$table->string('password');
$table->string('status')->default('pending');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}