laravel-all-module/database/migrations/2024_08_21_142442_create_users_table.php
example@gmail.com e1cd8884ab Test
2024-09-17 06:30:20 +07:00

35 lines
875 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->string('user_id', 16)->primary();
$table->string('user_name');
$table->string('user_alamat');
$table->string('user_username');
$table->string('user_email');
$table->string('user_notlp');
$table->string('user_password');
$table->enum('user_level', ['admin', 'anggota']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
}
};