Build: Make role facaulty by default

This commit is contained in:
Sallu9007
2025-01-27 01:00:04 +05:30
parent d3e046c6a2
commit 06ebafd104

View File

@@ -12,7 +12,7 @@ return new class extends Migration
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->unsignedBigInteger('role_id')->after('id');
$table->unsignedBigInteger('role_id')->after('id')->default(3);
$table->unsignedBigInteger('department_id')->nullable()->after('role_id');
$table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
$table->foreign('department_id')->references('id')->on('departments')->onDelete('cascade');