cattr-app/server-application

View on GitHub
database/migrations/2018_02_26_115120_create_screenshots_table.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

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

class CreateScreenshotsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('screenshots', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('time_interval_id')->unsigned();
            $table->string('path');
            $table->timestamps();
            $table->softDeletes();

            $table->foreign('time_interval_id')->references('id')->on('time_intervals');
        });
    }

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