takeone-youtube-clone/database/migrations/2026_02_23_000000_create_videos_table.php
2026-02-24 16:55:11 +00:00

30 lines
853 B
PHP
Executable File

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('videos', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('description')->nullable();
$table->string('filename');
$table->string('path');
$table->string('thumbnail')->nullable();
$table->integer('duration')->default(0);
$table->bigInteger('size')->default(0);
$table->enum('status', ['pending', 'processing', 'ready', 'failed'])->default('pending');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('videos');
}
};