diff --git a/database/migrations/2026_02_15_200000_create_video_generations_table.php b/database/migrations/2026_02_15_200000_create_video_generations_table.php new file mode 100644 index 0000000..60c8362 --- /dev/null +++ b/database/migrations/2026_02_15_200000_create_video_generations_table.php @@ -0,0 +1,36 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->unsignedBigInteger('user_id'); + $table->string('keyword', 255); + $table->string('title', 500)->nullable(); + $table->json('scenario')->nullable(); + $table->string('status', 50)->default('pending'); + $table->tinyInteger('progress')->unsigned()->default(0); + $table->string('current_step', 100)->nullable(); + $table->json('clips_data')->nullable(); + $table->string('output_path', 500)->nullable(); + $table->decimal('cost_usd', 8, 4)->default(0); + $table->text('error_message')->nullable(); + $table->timestamps(); + + $table->index(['tenant_id', 'user_id']); + $table->index('status'); + }); + } + + public function down(): void + { + Schema::dropIfExists('video_generations'); + } +};