<?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::table('users', function (Blueprint $table) {
            $table->text('bio')->nullable()->after('avatar');
            $table->string('banner_image')->nullable()->after('bio');
            $table->string('website', 200)->nullable()->after('banner_image');
            $table->string('twitter', 100)->nullable()->after('website');
            $table->string('instagram', 100)->nullable()->after('twitter');
            $table->string('discord', 100)->nullable()->after('instagram');
            $table->string('profile_color', 7)->nullable()->default('#00f5ff')->after('discord');
            $table->boolean('show_watchlist')->default(true)->after('profile_color');
            $table->boolean('show_activity')->default(true)->after('show_watchlist');
        });
    }

    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn([
                'bio', 'banner_image', 'website', 'twitter',
                'instagram', 'discord', 'profile_color',
                'show_watchlist', 'show_activity',
            ]);
        });
    }
};
