diff --git a/database/migrations/2024_04_10_182923_alter_bazar_categories_table.php b/database/migrations/2024_04_10_182923_alter_bazar_categories_table.php new file mode 100644 index 00000000..948ce847 --- /dev/null +++ b/database/migrations/2024_04_10_182923_alter_bazar_categories_table.php @@ -0,0 +1,30 @@ +after('id', static function (Blueprint $table): void { + $table->foreignId('parent_id')->nullable()->constrained('bazar_categories')->nullOnDelete(); + }); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('bazar_categories', static function (Blueprint $table): void { + $table->dropColumn('parent_id'); + }); + } +};