import "dotenv/config"
import { db } from "../src/shared/db"
import { sql } from "drizzle-orm"

async function clear() {
  await db.execute(sql`DELETE FROM error_book_reviews`)
  await db.execute(sql`DELETE FROM error_book_items`)
  console.log("✓ 已清空 error_book_reviews 和 error_book_items 表")
  process.exit(0)
}

clear().catch((e) => {
  console.error("❌ 清空失败:", e)
  process.exit(1)
})
