nordsoftware/lumen-file-manager

View on GitHub
src/Eloquent/migrations/2016_03_03_114121_create_files_table.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

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

class CreateFilesTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('files', function (Blueprint $table) {
            $table->increments('id');
            $table->string('file_id')->unique();
            $table->string('name');
            $table->string('extension')->nullable();
            $table->string('path')->nullable();
            $table->string('mime_type');
            $table->integer('byte_size');
            $table->json('data');
            $table->string('disk');
            $table->dateTime('saved_at');
        });
    }


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