Files
thankcard-system/database/migrations/0001_01_01_000000_create_users_table.php
T
2026-06-29 11:55:33 +07:00

38 lines
1.1 KiB
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('user', function (Blueprint $table) {
$table->string('msnv')->primary();
$table->string('mail');
$table->string('pass');
$table->tinyInteger('role')->default(0)->comment('0: member / 1: admin');
$table->tinyInteger('status')->default(1)->comment('0: đã nghỉ / 1: đang làm');
$table->integer('card')->nullable();
$table->tinyInteger('flag_send')->default(0)->comment('0: không được gửi / 1: được gửi');
$table->tinyInteger('first_login')->default(1)->comment('0: không là lần đầu / 1: lần đầu');
$table->rememberToken();
$table->timestamps();
});
// Only user table remains
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user');
}
};