Files

36 lines
1014 B
PHP
Raw Permalink Normal View History

<?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('assets', function (Blueprint $table) {
$table->id();
$table->foreignId('video_project_id')->constrained()->cascadeOnDelete();
$table->foreignId('workflow_step_id')->nullable()->constrained()->nullOnDelete();
$table->string('type');
$table->string('disk_path');
$table->string('mime_type')->nullable();
$table->unsignedBigInteger('size_bytes')->nullable();
$table->unsignedInteger('version')->default(1);
$table->json('metadata')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('assets');
}
};