// Remplace la vidéo générique "atelier" du drop O.M.T par une vraie vidéo
// de défilé techwear (Y-3 FW25, adidas Y-3 — chaîne officielle, vérifiée
// via oEmbed avant utilisation).
import { PrismaClient } from "@prisma/client"
import { PrismaPg } from "@prisma/adapter-pg"
import { Pool } from "pg"

const pool = new Pool({ connectionString: process.env.DATABASE_URL })
const db = new PrismaClient({ adapter: new PrismaPg(pool) })

const RUNWAY_VIDEO_URL = "https://www.youtube.com/embed/Pp8dpuAQvtM"

async function main() {
  const drop = await db.drop.findUniqueOrThrow({ where: { slug: "omt" } })
  const updated = await db.drop.update({
    where: { id: drop.id },
    data: { workshopVideoUrl: RUNWAY_VIDEO_URL },
  })
  console.log("OK,", updated.name, "-> vidéo défilé mise à jour :", updated.workshopVideoUrl)
}

main()
  .catch((e) => {
    console.error(e)
    process.exit(1)
  })
  .finally(() => db.$disconnect())
