<?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('artwork_contributors', function (Blueprint $table): void {
            $table->string('credit_role', 80)->nullable()->after('user_id');
            $table->boolean('is_primary')->default(false)->after('credit_role');
        });
    }

    public function down(): void
    {
        Schema::table('artwork_contributors', function (Blueprint $table): void {
            $table->dropColumn(['credit_role', 'is_primary']);
        });
    }
};