<?php

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

class CreateDeviceTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('Device', function (Blueprint $table) {
            $table->string('ID',20)->primary();
            $table->string("Location")->unique();
            $table->string("GPS");
            $table->integer("Server_ID");
            $table->integer("Device_Group_ID")->nullable();
            $table->timestamps();
        });
    }

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