%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/sljcon/database/migrations/
Upload File :
Create Path :
Current File : /var/www/html/sljcon/database/migrations/2018_02_27_230432_create_media_table.php

<?php

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

class CreateMediaTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('media', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('reference_id');
            $table->string('reference_type');
            $table->index(['reference_id', 'reference_type']);
            $table->string('file_name')->unique();
            $table->string('real_file_name');
            $table->enum('media_type', [
                App\Models\Media::MEDIA_TYPE_PROJECT_IMAGE,
                App\Models\Media::MEDIA_TYPE_PROJECT_GALLEY,
                App\Models\Media::MEDIA_TYPE_SECTION_IMAGE,
            ]);
            $table->timestamps();
        });
    }

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

Zerion Mini Shell 1.0