<?php

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

class CreateWebFormTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('web_form', function (Blueprint $table) {
            $table->id();
            $table->string('uid')->unique();
            $table->string('iid')->unique();
            $table->string('form_name')->nullable();
            $table->string('ip_address')->nullable();
            $table->string('device_type')->nullable();
            $table->jsonb('form_data')->nullable();
            $table->timestamps();
        });
    }

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