Upload beautify

This commit is contained in:
2026-02-14 15:14:12 +01:00
parent e129618910
commit 79192345e3
249 changed files with 24436 additions and 1021 deletions

View File

@@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::create('uploads', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('type', 32)->index(); // image, archive, etc.
$table->string('status', 32)->default('draft')->index();
$table->string('title')->nullable();
$table->string('slug')->nullable()->unique();
$table->foreignId('category_id')->nullable()->constrained('categories')->nullOnDelete();
$table->text('description')->nullable();
$table->json('tags')->nullable();
$table->string('license', 64)->nullable();
$table->boolean('nsfw')->default(false);
$table->boolean('is_scanned')->default(false)->index();
$table->boolean('has_tags')->default(false)->index();
$table->string('preview_path')->nullable();
$table->timestamp('published_at')->nullable()->index();
$table->string('final_path')->nullable();
$table->timestamp('expires_at')->nullable()->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Schema::dropIfExists('uploads');
}
};