42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
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('videos', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->softDeletes();
|
|
$table->uuid('uuid');
|
|
$table->foreignId('user_id')->nullable();
|
|
$table->string('external_id')->nullable();
|
|
|
|
$table->string('content_type')->default('blank')->index();
|
|
$table->integer('width');
|
|
$table->integer('height');
|
|
$table->enum('aspect_ratio', ['16:9', '9:16', '1:1', '4:3', '3:4'])->default('9:16');
|
|
$table->json('payload');
|
|
$table->json('render_settings');
|
|
|
|
$table->timestamps();
|
|
|
|
$table->foreign('user_id')->references('id')->on('users');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('videos');
|
|
}
|
|
};
|