Files
vkv/database/migrations/2025_11_15_072705_create_files_table.php
Zdeněk Burda 41e3ce6f25 Initial commit
2026-01-09 21:26:40 +01:00

34 lines
796 B
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('files', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('path');
$table->string('filename');
$table->string('mimetype');
$table->unsignedBigInteger('filesize');
$table->string('hash')->unique();
$table->string('uploaded_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('files');
}
};