import { db } from './src/lib/db'; import { youtubeChannels, youtubeVideos } from './src/lib/db/schema'; import { eq, and } from 'drizzle-orm'; async function check() { try { const videoId = 'XSa42Zz_vps'; console.log(`Checking video: ${videoId}`); const results = await db .select({ id: youtubeVideos.id, videoId: youtubeVideos.videoId, channelId: youtubeVideos.channelId, creatorSlug: youtubeChannels.creatorSlug, creatorId: youtubeChannels.creatorId }) .from(youtubeVideos) .innerJoin(youtubeChannels, eq(youtubeVideos.channelId, youtubeChannels.id)) .where(eq(youtubeVideos.videoId, videoId)); console.log('Results:', JSON.stringify(results, null, 2)); } catch (err) { console.error('Error:', err); } process.exit(0); } check();