products - common_codes - parts - products - files - price_histories - boms - bom_items boards - boards - board_settings - posts - board_comments - board_files - post_custom_field_values permissions - menus - roles - user_menu_permissions - role_menu_permissions tenants - tenants - plans - subscriptions - payments
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');
|
|
}
|
|
};
|