<?php

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

class CreateCompanyAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('company_addresses', function (Blueprint $table) {
            $table->id();
			$table->char('uuid', 36)->index()->unique();
			$table->integer('company_id')->index();
			$table->string('type')->index();
			$table->string('full', 500)->nullable();
			$table->string('postcode')->nullable();
			$table->string('country')->nullable();
			$table->string('region')->nullable();
			$table->string('city')->nullable();
			$table->string('district')->nullable();
			$table->string('street')->nullable();
			$table->string('house')->nullable();
			$table->string('block')->nullable();
			$table->string('office')->nullable();
            $table->timestamps();
			$table->softDeletes();
        });
    }

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