<?php

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

class CreateClientsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('clients', function(Blueprint $table)
		{
			$table->id();
			$table->string('name', 128)->unique();
			$table->unsignedBigInteger('primary_site')->nullable();
			$table->unsignedBigInteger('primary_contact')->nullable();
			$table->float('contract_id')->unsigned()->nullable();
			$table->float('contract_price')->default(0);
			$table->timestamp('contract_start_date');
			$table->timestamp('contract_end_date');
			$table->unsignedBigInteger('sla_id')->nullable();
			$table->string('website', 128)->default('');
			$table->timestamps();
		});
	}

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

}
