<?php

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

class CreateAddressBookTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('address_book', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('type');
            $table->integer('reference_id');
            $table->string('reference')->nullable();
            $table->string('contact', 25)->nullable();
            $table->string('street_one', 80)->nullable();
            $table->string('street_two', 80)->nullable();
            $table->string('city', 50)->nullable();
            $table->string('state', 50)->nullable();
            $table->string('post_code', 10)->nullable();
            $table->string('country')->nullable();
            $table->boolean('default')->default(0);
            $table->boolean('billing')->default(0);
            $table->timestamps();
        });

    }

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