Files
bogazici-api/database/migrations/2026_03_02_090009_create_comments_table.php
2026-03-27 10:41:54 +03:00

35 lines
839 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('comments', function (Blueprint $table) {
$table->id();
$table->morphs('commentable');
$table->string('name_surname');
$table->string('phone');
$table->text('body');
$table->text('admin_reply')->nullable();
$table->boolean('is_approved')->default(false);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('comments');
}
};