diff --git a/database/migrations/2025_01_12_225005_create_blogs_table.php b/database/migrations/2025_01_12_225005_create_blogs_table.php index 32055fe..ea78c4c 100644 --- a/database/migrations/2025_01_12_225005_create_blogs_table.php +++ b/database/migrations/2025_01_12_225005_create_blogs_table.php @@ -11,6 +11,15 @@ return new class extends Migration */ public function up(): void { + Schema::create('blog_categories', function (Blueprint $table) { + $table->id(); + + $table->string ("name")->unique (); + $table->string ("slug")->unique (); + + $table->timestamps(); + }); + Schema::create('blogs', function (Blueprint $table) { $table->id(); @@ -35,5 +44,6 @@ return new class extends Migration public function down(): void { Schema::dropIfExists('blogs'); + Schema::dropIfExists('blog_categories'); } }; diff --git a/database/migrations/2025_01_12_225655_create_blog_categories_table.php b/database/migrations/2025_01_12_225655_create_blog_categories_table.php deleted file mode 100644 index b7d9e7f..0000000 --- a/database/migrations/2025_01_12_225655_create_blog_categories_table.php +++ /dev/null @@ -1,31 +0,0 @@ -id(); - - $table->string ("name")->unique (); - $table->string ("slug")->unique (); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('blog_categories'); - } -};