File: /var/www/html/laravel/database/migrations/2025_09_18_070458_mel_pdf_files.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('mel_pdf_files', function (Blueprint $table) {
$table->id();
$table->string('file_path')->nullable();
$table->string('file_name')->nullable();
$table->integer('pages_total')->default(0);
$table->integer('pages_converted')->default(0);
$table->integer('pages_processed')->default(0);
$table->integer('status')->default(0);
$table->string('extract_data_with')->nullable();
$table->longText('content')->nullable();
$table->longText('log_messages')->nullable();
$table->timestamps();
});
$dir = storage_path('app/public/uploads/pdfImages');
if (!is_dir($dir)) {
mkdir($dir, 0777, true);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};