From af4f6b9fa6e527582a416f2cee544c195433632e Mon Sep 17 00:00:00 2001 From: a6a2f5842 Date: Fri, 21 Nov 2025 16:03:24 +0100 Subject: [PATCH] MBF product categories migration --- database/migrations/create_blax_shop_tables.php.stub | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database/migrations/create_blax_shop_tables.php.stub b/database/migrations/create_blax_shop_tables.php.stub index a28633b..0728db5 100644 --- a/database/migrations/create_blax_shop_tables.php.stub +++ b/database/migrations/create_blax_shop_tables.php.stub @@ -82,7 +82,9 @@ return new class extends Migration if (!Schema::hasTable(config('shop.tables.product_categories', 'product_categories'))) { Schema::create(config('shop.tables.product_categories', 'product_categories'), function (Blueprint $table) { $table->uuid('id')->primary(); + $table->string('name'); $table->string('slug')->unique(); + $table->text('description')->nullable(); $table->uuid('parent_id')->nullable(); $table->integer('sort_order')->default(0); $table->boolean('visible')->default(true); @@ -91,6 +93,7 @@ return new class extends Migration $table->softDeletes(); $table->index(['parent_id', 'visible']); + $table->index(['slug', 'visible']); $table->foreign('parent_id')->references('id')->on(config('shop.tables.product_categories', 'product_categories'))->onDelete('cascade'); }); }