This commit is contained in:
Ghostie 2025-01-12 21:38:04 -05:00
parent 81f0d8818f
commit ded4ca5a1b
2 changed files with 10 additions and 31 deletions

View File

@ -11,6 +11,15 @@ return new class extends Migration
*/ */
public function up(): void 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) { Schema::create('blogs', function (Blueprint $table) {
$table->id(); $table->id();
@ -35,5 +44,6 @@ return new class extends Migration
public function down(): void public function down(): void
{ {
Schema::dropIfExists('blogs'); Schema::dropIfExists('blogs');
Schema::dropIfExists('blog_categories');
} }
}; };

View File

@ -1,31 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('blog_categories', function (Blueprint $table) {
$table->id();
$table->string ("name")->unique ();
$table->string ("slug")->unique ();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('blog_categories');
}
};