<?php

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

class CreatePushDevicesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('push_devices', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('device_id', 255)->unique();
			$table->enum('type', ['android', 'apple'])->default('android');
			$table->unsignedBigInteger('user_id')->nullable();
			$table->timestamps();
		});
	}

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

}
