24 lines
728 B
PHP
24 lines
728 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
|
||
|
|
return new class extends Migration
|
||
|
|
{
|
||
|
|
public function up()
|
||
|
|
{
|
||
|
|
Schema::create('roles', function (Blueprint $table) {
|
||
|
|
$table->bigIncrements('id')->comment('PK: 역할 ID');
|
||
|
|
$table->unsignedBigInteger('tenant_id')->nullable()->index()->comment('FK: 테넌트 ID(null=공용역할)');
|
||
|
|
$table->string('name', 50)->comment('역할명');
|
||
|
|
$table->string('description', 255)->nullable()->comment('설명');
|
||
|
|
$table->timestamps();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
public function down()
|
||
|
|
{
|
||
|
|
Schema::dropIfExists('roles');
|
||
|
|
}
|
||
|
|
};
|