<?php

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

class CreateUserDataTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('user_data', function (Blueprint $table)
        {
            $table->increments('id');
            $table->string('burner_name')->nullable();
            $table->string('real_name')->nullable();
            $table->string('address')->unique();
            $table->string('phone')->unique();
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
            $table->timestamps();
        });
    }

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

<?php

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

class CreateUserDataTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('user_data', function (Blueprint $table)
        {
            $table->increments('id');
            $table->string('burner_name')->nullable();
            $table->string('real_name')->nullable();
            $table->string('address');
            $table->string('phone');
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
            $table->timestamps();
        });
    }

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

Update the userdata migration for address and phone
Update the userdata migration for address and phone

The user address and phone number do not need to be unique. This fixes
an issue where the data is null. It is also possible for applicants
to be at the same address and phone.

Signed-off-by: Marc Jones <bb1304e98184a66f7e15848bfbd0ff1c09583089@gmail.com>
