feat: 菜单新增 active_menu 字段
This commit is contained in:
@@ -28,7 +28,6 @@ return new class () extends Migration {
|
||||
$table->string('redirect')->nullable()->comment('跳转地址');
|
||||
$table->tinyInteger('keepalive')->default(1)->comment('1 缓存 2 不缓存');
|
||||
$table->tinyInteger('type')->default(1)->comment('1 目录 2 菜单 3 按钮');
|
||||
$table->tinyInteger('is_inner')->default(2)->comment('1 是 2 否');
|
||||
$table->tinyInteger('hidden')->default(1)->comment('1 显示 2 隐藏');
|
||||
$table->integer('sort')->default(1)->comment('排序');
|
||||
$table->creatorId();
|
||||
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('permissions', 'is_inner')) {
|
||||
$table->removeColumn('is_inner');
|
||||
}
|
||||
|
||||
$table->string('active_menu')->default('')->comment('访问内页时,需要激活的菜单栏')->after('sort');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user