file-management-system/database/migrations/2014_10_12_000000_create_users_table.php

44 lines
1.2 KiB
PHP
Raw Normal View History

2023-04-11 09:21:20 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
2023-04-17 05:36:48 +00:00
$table->foreignIdFor('App\Models\Directorat', 'directorat_id')->nullable();
$table->foreignIdFor('App\Models\SubDirectorat', 'sub_directorat_id')->nullable();
2023-04-11 09:21:20 +00:00
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
2023-04-11 09:21:20 +00:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
};