<?php

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

class AddColumnPropertyTableCountryField extends Migration
{
    public function up()
    {
        Schema::table('property', function (Blueprint $table) {
            $table->string('country',5)->after('destination_id')->nullable();

        });

        Schema::table('property', function (Blueprint $table) {
            $table->foreign('country')->references('country_code')->on('country');
        });
    }


    public function down()
    {

    }
}
