<?php

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

class CreateKuesionerLearningStyleTable extends Migration
{
    public function up()
    {
        Schema::create('kuesioner_learning_style', function (Blueprint $table) {
            $table->id();
            $table->string('email');
            $table->foreign('email')
                  ->references('email')
                  ->on('user')
                  ->onDelete('cascade');
            $table->unsignedTinyInteger('visual')->nullable();
            $table->unsignedTinyInteger('auditory')->nullable();
            $table->unsignedTinyInteger('readwrite')->nullable();
            $table->unsignedTinyInteger('kinesthetic')->nullable();
            $table->unsignedTinyInteger('id_style')->nullable();
            $table->string('result')->nullable();
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('kuesioner_learning_style');
    }
}