<?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('tbl_authors', function (Blueprint $table) {
            $table->increments('author_id');
            $table->string('slug', 150)->unique();
            $table->string('name', 150);
            $table->string('image', 255)->nullable();
            $table->string('designation', 150)->nullable();
            $table->text('bio')->nullable();
            $table->year('joined_year')->nullable();
            $table->string('location', 150)->nullable();
            $table->json('social')->nullable();
            $table->timestamps();
        });
    }
    public function down(): void { Schema::dropIfExists('tbl_authors'); }
};
