<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('randd_voting_paper_answers', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('vote_id')->nullable()->index('randd_voting_paper_answers_vote_id_foreign');
            $table->bigInteger('score');
            $table->tinyInteger('score_type');
            $table->text('description')->nullable();
            $table->unsignedInteger('user_id')->nullable()->index('randd_voting_paper_answers_user_id_foreign');
            $table->bigInteger('q_id');
            $table->string('q_fa');
            $table->string('fullname')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('randd_voting_paper_answers');
    }
};
