File: //home/xedaptot/ai.naniguide.com/database/migrations/2026_03_26_000001_create_tutorials_table.php
<?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('tutorials', function (Blueprint $table) {
$table->id();
$table->string('uid', 32)->unique();
$table->string('slug')->unique(); // machine key, e.g. 'gmail-oauth-setup'
$table->string('category')->nullable(); // e.g. 'sending-server', 'general'
$table->unsignedInteger('sort_order')->default(0);
$table->enum('status', ['active', 'inactive'])->default('active');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('tutorials');
}
};