<?php

use Illuminate\Database\Migrations\Migration;

class CreateLeadsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('leads', function($table) {
			$table->increments('id');
			$table->integer('project_id');
			$table->integer('site_id');
			$table->string('entrypoint')->nullable();
			$table->string('name')->nullable();
			$table->string('phone')->nullable();
			$table->string('email')->nullable();
			$table->string('referrer')->nullable();
			$table->string('referrer_host')->nullable();
			$table->string('search_word')->nullable();
			$table->text('data')->nullable();
			$table->softDeletes();
			$table->timestamps();
			$table->engine = 'InnoDB';
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('leads');
	}

}
