Files
movies/database/migrations/2025_01_27_191029_create_posts_table.php
T
2025-02-16 21:11:07 +02:00

33 lines
787 B
PHP

<?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('forum_posts', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('topic_id');
$table->unsignedBigInteger('thread_id');
$table->unsignedBigInteger('category_id');
$table->text('content');
$table->unsignedBigInteger('user_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('forum_posts');
}
};