2024-12-30 03:06:20 +02:00
|
|
|
<?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('comments', function (Blueprint $table) {
|
|
|
|
|
$table->id();
|
|
|
|
|
$table->integer('entity_id');
|
|
|
|
|
$table->string('entity_type');
|
2025-02-16 21:11:07 +02:00
|
|
|
$table->integer('user_id')->nullable();
|
|
|
|
|
$table->string('author_name')->nullable();
|
2025-01-04 02:13:07 +02:00
|
|
|
$table->string('author_avatar')->nullable();
|
|
|
|
|
$table->integer('author_rating')->nullable();
|
2024-12-30 03:06:20 +02:00
|
|
|
$table->text('content');
|
|
|
|
|
$table->datetime('published_at');
|
2025-02-16 21:11:07 +02:00
|
|
|
$table->string('tmdb_id')->nullable();
|
|
|
|
|
$table->string('tmdb_url')->nullable();
|
2024-12-30 03:06:20 +02:00
|
|
|
$table->timestamps();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*/
|
|
|
|
|
public function down(): void
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('comments');
|
|
|
|
|
}
|
|
|
|
|
};
|