<?php

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

class CreateAddressesTable extends Migration
{
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('user_id');
            $table->unsignedBigInteger('city_id');
//            $table->bigInteger('phone');
            $table->string('address')->nullable();
            $table->string('home')->nullable();
            $table->string('landmark')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('city_id')->references('id')->on('cities');

        });
    }

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