%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/geotechnics/api/database/migrations/
Upload File :
Create Path :
Current File : /var/www/html/geotechnics/api/database/migrations/2019_05_16_193721_create_devices_table.php

<?php

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

class CreateDevicesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('devices', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('user_id')
                  ->nullable()
                  ->index();
            $table->foreign('user_id')
                  ->references('id')
                  ->on('users');
            $table->string('uuid')
                  ->unique();
            $table->string('token')
                  ->unique();
            $table->string('language');
            $table->string('model')
                  ->nullable();
            $table->string('platform')
                  ->nullable();
            $table->string('version')
                  ->nullable();
            $table->string('manufacturer')
                  ->nullable();
            $table->timestamps();
        });
    }

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

Zerion Mini Shell 1.0