GrafiteInc/CMS

View on GitHub
src/Migrations/2015_07_03_133637_create_files_table.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

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

class CreateFilesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create(config('cms.db-prefix', '').'files', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('location');
            $table->integer('user');
            $table->string('tags')->nullable();
            $table->text('details')->nullable();
            $table->string('mime');
            $table->string('size');
            $table->boolean('is_published')->default(0);
            $table->integer('order');
            $table->nullableTimestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::drop(config('cms.db-prefix', '').'files');
    }
}