Viewing File: /home/ubuntu/efidemo/database/migrations/2022_11_22_062412_create_documents_table.php

<?php

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

class CreateDocumentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('documents', function (Blueprint $table) {
            $table->id();
            $table->string('unique_id')->unique();
            $table->string('name');
            $table->string('file')->default(asset('document.jpg'));
            $table->string('front')->default(asset('document.jpg'));
            $table->string('back')->default(asset('document.jpg'));
            $table->tinyInteger('type')->default(SINGLE_PAGE);
            $table->longText('description')->nullable();
            $table->tinyInteger('status')->default(APPROVED);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('documents');
    }
}
Back to Directory File Manager