39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
<?php
 | 
						|
 | 
						|
use Illuminate\Database\Migrations\Migration;
 | 
						|
use Illuminate\Database\Schema\Blueprint;
 | 
						|
use Illuminate\Support\Facades\Schema;
 | 
						|
 | 
						|
return new class extends Migration
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Run the migrations.
 | 
						|
     */
 | 
						|
    public function up(): void
 | 
						|
    {
 | 
						|
        Schema::create('ms_menu', function (Blueprint $table) {
 | 
						|
            $table->id('MsMenuId');
 | 
						|
            $table->foreignId('parent_id')->index()->default(0)->comment('idx menu_id');
 | 
						|
            $table->string('title', 150);
 | 
						|
            $table->string('module', 150)->nullable();
 | 
						|
            $table->string('url', 150)->nullable();
 | 
						|
            $table->string('menu_type', 50)->index()->nullable()->comment('tb_menu_group alias');
 | 
						|
            $table->string('menu_icons', 50)->nullable();
 | 
						|
            $table->tinyInteger('ordering')->default(0);
 | 
						|
            $table->boolean('status')->default(true)->comment('True/False');
 | 
						|
            $table->foreignId('created_by')->default(0);
 | 
						|
            $table->foreignId('updated_by')->default(0)->nullable();
 | 
						|
            $table->timestamps();
 | 
						|
            $table->comment('Master menu aplikasi');
 | 
						|
        });
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Reverse the migrations.
 | 
						|
     */
 | 
						|
    public function down(): void
 | 
						|
    {
 | 
						|
        Schema::dropIfExists('menus');
 | 
						|
    }
 | 
						|
};
 |