<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void {
Schema::create('testimonials', function (Blueprint $table) {
$table->id();
$table->enum('source', ['manual','google_review'])->default('manual');
$table->string('client_name', 255);
$table->string('designation', 255)->nullable();
$table->string('company', 255)->nullable();
$table->string('photo', 500)->nullable();
$table->text('quote');
$table->tinyInteger('rating')->default(5);
$table->enum('status', ['draft','approved','rejected'])->default('approved');
$table->string('google_review_id', 255)->nullable()->unique();
$table->integer('sort_order')->default(0);
$table->timestamps();
});
}
public function down(): void { Schema::dropIfExists('testimonials'); }
};