<?php

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

class CreateSitesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('sites', function(Blueprint $table)
		{
			$table->bigIncrements('id');
			$table->string('name', 64);
			$table->unsignedBigInteger('client_id')->index();
			$table->string('address', 128);
			$table->string('address2', 128);
			$table->string('postcode', 15);
			$table->string('primary_phone', 15);
			$table->timestamps();
		});
	}

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

}
