From 3ecff16f753ecd00083ffe4ae01d612d0e7f3b87 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 6 Sep 2025 19:41:14 +0000 Subject: [PATCH] Update video data insertion with all necessary fields Modify the `VideoSyncService` in `server/videoSync.ts` to insert new videos into the database with all required columns, including `content_type`, `genre`, and `upload_status`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d17a6e5e-0a8b-4a50-b346-88bffd02af01 Replit-Commit-Checkpoint-Type: intermediate_checkpoint --- server/videoSync.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/videoSync.ts b/server/videoSync.ts index 806e1c1..6d0a380 100644 --- a/server/videoSync.ts +++ b/server/videoSync.ts @@ -116,10 +116,10 @@ class VideoSyncService { }; if (existingVideo.rows.length === 0) { - // Insert new video using raw SQL to avoid schema issues + // Insert new video using raw SQL with all required columns await db.execute(sql` - INSERT INTO videos (id, title, description, thumbnail_url, video_url, duration, views, category, custom_thumbnail_url, tags, is_public, created_at, updated_at) - VALUES (${videoData.id}, ${videoData.title}, ${videoData.description}, ${videoData.thumbnailUrl}, ${videoData.videoUrl}, ${videoData.duration}, ${videoData.views}, ${videoData.category}, ${videoData.customThumbnailUrl}, ${'{' + videoData.tags.join(',') + '}'}, ${videoData.isPublic}, ${videoData.createdAt.toISOString()}, ${videoData.updatedAt.toISOString()}) + INSERT INTO videos (id, title, description, thumbnail_url, video_url, duration, views, category, custom_thumbnail_url, tags, is_public, content_type, genre, upload_status, created_at, updated_at) + VALUES (${videoData.id}, ${videoData.title}, ${videoData.description}, ${videoData.thumbnailUrl}, ${videoData.videoUrl}, ${videoData.duration}, ${videoData.views}, ${videoData.category}, ${videoData.customThumbnailUrl}, ${'{' + videoData.tags.join(',') + '}'}, ${videoData.isPublic}, 'video', 'other', 'completed', ${videoData.createdAt.toISOString()}, ${videoData.updatedAt.toISOString()}) `); insertedCount++; } else {