feat(usermanagement): create positions table and add position_id to roles table with foreign key constraint

This commit is contained in:
Sholahuddin Al Ayubi
2026-01-15 10:45:11 +07:00
parent 5e0544f375
commit f421585d8a
3 changed files with 1 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('positions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('code')->unique();
$table->string('name');
$table->integer('level');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('positions');
}
};