35 lines
875 B
PHP
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');
|
||
|
}
|
||
|
};
|