<?php

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

class CreateBranchDetailsTable extends Migration {

	public function up()
	{
		Schema::create('branch_details', function(Blueprint $table) {
			$table->increments('id');
			$table->string('key', 100);
			$table->string('value', 250);
			$table->string('details', 250)->nullable();
			$table->integer('branch_id')->unsigned()->nullable();
			$table->foreign('branch_id')->references('id')->on('branches');

            $table->softDeletes();
            $table->timestamps();
            $table->engine = 'InnoDB';
		});
	}

	public function down()
	{
		Schema::drop('branch_details');
	}
}