<?php

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

class CreatePromotionsTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create( 'promotions', function ( Blueprint $table ) {
			$table->increments( 'id' );
			$table->integer( 'user_id' )->nullable();
			$table->dateTime( 'start_date' )->nullable();
			$table->dateTime( 'end_date' )->nullable();
			$table->string( 'title' )->nullable();
			$table->text( 'desc' )->nullable();
			$table->integer( 'from' )->nullable();
			$table->timestamps();
			$table->softDeletes();
		} );
	}

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