diff --git a/database/migrations/2025_12_02_163035_alter_products_table_set_category_id_default.php b/database/migrations/2025_12_02_163035_alter_products_table_set_category_id_default.php new file mode 100644 index 0000000..bc4abb2 --- /dev/null +++ b/database/migrations/2025_12_02_163035_alter_products_table_set_category_id_default.php @@ -0,0 +1,28 @@ +unsignedBigInteger('category_id')->default(0)->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('products', function (Blueprint $table) { + $table->unsignedBigInteger('category_id')->default(null)->change(); + }); + } +}; \ No newline at end of file